Following are some steps to run this Rest API locally, using your local MongoDB:
- Initialize all the dependencies first by doing
npm i
- Make sure MongoDB is pre-installed on your local system. Create a local database named as pratilipi. Inside that DB, create a new user with user test and pwd test123 with readwrite and dbAdmin role access.
- Install Nodemon globally for running the API or simply use
node
(as you wish). - Once all this is done, simply run
nodemon server/server.js
in the root directory. - The REST API can now successfully be seen running at Port 3000