Node.js Mongoose – Installation

In this tutorial, we shall learn to install Mongoose package using npm (Node Package Manager).


It is assumed that you have already installed Node.js and MongoDB. If incase not, then you may refer the below links.


To install Mongoose package, use npm (Node Package Manager). Open a terminal and run the following command :

$ npm installmongoose

Using Mongoose

To use Mongoose in Node.js Script File, include require statement with mongoose package.

Conclusion :

In this tutorial, we have learnt how to install a Mongoose package and start using its reference.