Kindly run npm -v and mongo --version as these will show you the version of NPM and MongoDB installed on your machine.
Create a package.json file
- npm init
Let's install express and nodmon, express will be used to create the server while nodmon will help us to keep track of changes to our application by watching changed files and automatically restart the server.
-
npm install --save-dev nodemon
-
npm install express --save
Firsr of all, let’s install mongoose
- npm install mongoose --save
On successful installation, your package.json file will be modified to have the two newly installed packages.
https://www.codementor.io/olatundegaruba/nodejs-restful-apis-in-10-minutes-q0sgsfhbd
Author:
Michael Trans