Can't fetch with Mongoose but working with Mongo shell Can't fetch with Mongoose but working with Mongo shell mongoose mongoose

Can't fetch with Mongoose but working with Mongo shell


User.find() doesn't return the results of the query; those are passed to the callback that you provide as a parameter to find.

exports.fetch = function(req, res) {    User.find(function(err, users) {        res.send(users);    });};

If you don't provide a callback, then a Query object is returned (which is what you're seeing in the response).