Skip to content

Instantly share code, notes, and snippets.

@mt9304
Last active October 2, 2019 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mt9304/9f70f639201c9a287cd77ce8a1688a06 to your computer and use it in GitHub Desktop.
Save mt9304/9f70f639201c9a287cd77ce8a1688a06 to your computer and use it in GitHub Desktop.
'use strict';
var mongoose = require('mongoose'),
Item = mongoose.model('Items');
exports.list_all_items = function(req, res) {
Item.find({}, function(err, item) {
if (err)
res.send(err);
res.json(item);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment