Mongoose Installation
How to install mongoose using npm
"npm" is a tool avaiable to install mongoose
Use this command in Command prompt/Shell
npm install mongoose
Install Mongoose in Custom Location
If we need the mongoose libraries in our custom directory then
do as below.
- Create a package.json file and palce this code in that file
{ "name" : "MyMongoose", "dependencies" : { "express" : "~4.8.8", "morgan": "~1.3.0", "compression": "~1.0.11", "body-parser": "~1.8.0", "method-override": "~2.2.0", "mongodb": "~2.1", "mongoose": "~3.8.15" } }
- Now use this command from the command prompt (where the
package.json is exist)
npm install
or
npm update
- Now a folder named “node_modules” will be created with above dependencies