June 2018
Intermediate to advanced
348 pages
8h 19m
English
To install Mongoose, we will use NPM. So, in your Terminal, navigate to the wc-backend project and run the following command:
$ npm install --save mongoose
Once the installation is done, we need to get into the src folder and create a new folder called config. In the config folder, now create a new file called mongoose-connection.js:
$ cd src$ mkdir config$ touch config/mongoose-connection.js
Now that we have Mongoose installed and we have created our configuration file, it is time to write some code to establish the connection to MongoDB.
Read now
Unlock full access