Created
January 10, 2014 16:52
-
-
Save garbados/8357943 to your computer and use it in GitHub Desktop.
How to stream a CouchDB view to a response using Nano.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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