node-restcat:带有 Express.js 和 Mongoose 的 RESTful api

时间:2021-06-29 10:49:31
【文件属性】:
文件名称:node-restcat:带有 Express.js 和 Mongoose 的 RESTful api
文件大小:2.7MB
文件格式:ZIP
更新时间:2021-06-29 10:49:31
JavaScript 节点restcat 该库提供了基于 mongoose 和 express.js 的 REST 接口,其灵感来自 django 的 Tastypie。 入门 首先,请确保您的 express 和 mongoose 已正确安装。 在你的 shell 中,使用 npm 安装: npm install restcat 在您的代码中配置猫鼬模式: //models/index.js //------------------------------ var mongoose = require ( 'mongoose' ) ; var userSchema = new mongoose . Schema ( { username : String , password : String } ) ; exports . user = mongoose . model ( 'User' ,

网友评论