Skip to content

Instantly share code, notes, and snippets.

@tarlepp
Forked from kedarmhaswade/ItemsController.js
Last active August 29, 2015 14:02
Show Gist options
  • Select an option

  • Save tarlepp/467e1bc702a4f593a338 to your computer and use it in GitHub Desktop.

Select an option

Save tarlepp/467e1bc702a4f593a338 to your computer and use it in GitHub Desktop.
find: function(req, res) {
Items
.find()
.exec(function(err, val) {
if (err) {
res.send(err);
} else if (val) {
res.send(val);
} else {
res.send({});
}
});
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment