Skip to content

Instantly share code, notes, and snippets.

@garbados
Created January 10, 2014 16:52
Show Gist options
  • Save garbados/8357943 to your computer and use it in GitHub Desktop.
Save garbados/8357943 to your computer and use it in GitHub Desktop.
How to stream a CouchDB view to a response using Nano.
var nano = require('nano');
var url = '...'; // URL to your Cloudant database
var db = nano(url);
app.get('route', function (req, res) {
db.view('design_name', 'view_name').pipe(res);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment