O'Reilly logo

Hands-On Full Stack Web Development with Aurelia by Erikson Haziz Murrugarra Sifuentes, Diego Jose Arguelles Rojas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Installing Mongoose

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required