I'm developing a simple application using CouchDB and Node.js. I have few documents in my database and created a view to retrieve the documents. How can I get the view from CouchDB in my javascript file?
app.get('/find', function(req, res){
var cradle = require('cradle');
var connection = new(cradle.Connection)('http://localhost:5984/', 443);
var db = connection.database('db');
db.view('_design/usersView/users', function (err, response) {
console.log(response);
});
The response says: undefined