Here's my view in the admin console:
Here's my code to call it via the API:
var query = cb.view('_design/dev_user/', 'by_name');
console.log(query);
query.query(function(err, results) {
console.log(err);
});
This is the output:
{ _cb: { queryhosts: null, mchosts: '', srvhost: null, hosts: 'localhost:8091', _cb: { _handleRestResponse: [Function] }, connected: false }, ddoc: '_design/dev_user', name: 'by_name', q: {} }
{ [Error: REST error: bad_request] code: 4104, reason: 'attachments not supported in Couchbase' }
Any idea what I'm doing wrong?
You can call view by this way :
cb.view("dev_user", "by_name", {stale:false}).query(function(err, results)
{
console.log(err);
});