Last active
October 2, 2019 22:59
-
-
Save mt9304/9f70f639201c9a287cd77ce8a1688a06 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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