mongoose get all collections code example
Example 1: get all data in collection mongodb
db.collection_name.find().pretty()
Example 2: mongoose get all documents big
var query = templateData.find({}).stream();
query.on('data', function (doc) {
// do something with the mongoose document
}).on('error', function (err) {
// handle the error
}).on('close', function () {
// the stream is closed
});