I want to know how to run Node.js project connected with MongoDB, { downloaded from GitHub } in my pc
I want to run this project in my laptop
CodePudding user response:
As the readme file suggested you first have to create a .env
file, then proceed by adding the two required values in your env file:
MONGO_URI=your mongo db URI goes here
JWT_SECRET=your JWT Secret token goes here
then run npm i
to install all the required packages and npm start
to run the project
CodePudding user response:
This project uses the dotenv
You can see that the code reads some variable values from a .env
file. This file is not pushed usually for security issues.
create a file named .env
at the root of your project. Add two variables:
MONGO_URI = mongodb://localhost:27017
JWT_SECRET = <your JWT secret token>
Then run again the server again : npm start