I have been trying to connect to couchDB to get some data back or do anything with it. I have not been able to connect to couchDB!
Please can anyone tell what am I doing wrong. Please!!!
When run this program it console logs "incoming requests" & "Got it" but nothing else.
Please just tell me how to connect to couchDB.
var restify = require("restify");
var server = restify.createServer();
server.listen(8080, function(){
console.log("incoming requests");
});
server.get('/users', function(req, res){
var request = require('request');
request('http://domain.iriscouch.com/testbook/_all_docs', function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body);
}
});
console.log("Got it!");
res.end();
});