node.js - How to do a simple MongoDB find query on LoopbackJS? -
i want know how perform simple findall or findone query on loopbackjs.
on different question suggest me do this:
module.exports = function(transaction) { transaction.observe('access', function(ctx, next) { transaction.find({}, function(err, data) { console.log(data); next();// sure call callback function }); }); };
but trying on api explorer gives me out of range error , seems complicated simple query.
solver, check docs here:
https://docs.strongloop.com/display/public/lb/extend+your+api
Comments
Post a Comment