首页 > Linux操作系统 > Linux操作系统 > Mongoose介绍
What's Mongoose?
Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment.
Defining a model is as easy as:
CODE:
var Comment = new Schema({Installation
The recommended way is through the excellent NPM:
$ npm install mongoose
Otherwise, you can check it in your repository and then expose it:
$ git clone git://github.com/LearnBoost/mongoose.git node_modules/mongoose/
And install dependency modules written on package.json.
Then you can require it:
require('mongoose')
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/301743/viewspace-739939/ ,如需转载,请注明出处,否则将追究法律责任。