Following an example from the mongodb manual for nodejs, I am finding all documents from a db as follows
mongo.Db.connect(mongoUri, function (err, db) {
You can stream the results of a node.js native driver's query by calling stream() on the returned cursor:
var stream = collection.find().stream();
stream.on('data', function(doc) {
console.log(doc);
});
stream.on('error', function(err) {
console.log(err);
});
stream.on('end', function() {
console.log('All done!');
});