Last active
March 27, 2017 15:16
-
-
Save itswadesh/c53d49199f114e1a156c6c1c5fe1c6fc 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
// Dependencies | |
var restful = require('node-restful'); | |
var mongoose = restful.mongoose; | |
// Schema | |
var productSchema = new mongoose.Schema({ | |
name: String, | |
sku: String, | |
price: Number | |
}); | |
// Return model | |
module.exports = restful.model('Products', productSchema); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment