blob: fac2e6fbf3dd21910ec443413d0179567727f6f7 [file] [log] [blame]
var express = require('express')
, db = require('nano')('http://localhost:5984/my_couch')
, app = module.exports = express.createServer()
;
app.get('/', function(request,response) {
db.get('foo', function (error, body, headers) {
if(error) { return response.send(error.message, error['status-code']); }
response.send(body, 200);
});
});
});
app.listen(3333);
console.log('server is running. check expressjs.org for more cool tricks');