diff options
Diffstat (limited to 'common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/models/user.js')
-rw-r--r-- | common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/models/user.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/models/user.js b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/models/user.js new file mode 100644 index 00000000..384e318f --- /dev/null +++ b/common/src/main/webapp/usageguide/appserver/node_modules/node-restful/examples/notes/models/user.js @@ -0,0 +1,13 @@ +var restful = require('../../..'), + mongoose = require('mongoose'); + +var User = new restful.Model({ + title: 'user', + methods: ['get', 'post', 'put', 'delete'], + schema: mongoose.Schema({ + username: 'string', + password: 'string', + }), +}); + +exports = module.exports = User; |