Skip to content

Instantly share code, notes, and snippets.

@itswadesh
Last active March 27, 2017 15:16
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 itswadesh/c53d49199f114e1a156c6c1c5fe1c6fc to your computer and use it in GitHub Desktop.
Save itswadesh/c53d49199f114e1a156c6c1c5fe1c6fc to your computer and use it in GitHub Desktop.
// 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