I want to know how to run Node.js project connected with MongoDB, { downloaded from GitHub } in my pc
Project link https://github.com/john-smilga/node-express-course/tree/main/06-jobs-api/final
In its read me file it has been written that
#### Project Setup
In order to spin up the project, in the root create .env with these two variables, with your own values.
MONGO_URI
JWT_SECRET
After that run this command
```bash
npm install && npm start
```
I have installed MongoDB community version, but need help in setting up and run this project
I want to run this project in my laptop
2
Answers
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:then run
npm i
to install all the required packages andnpm start
to run the projectThis project uses the
dotenv
https://github.com/john-smilga/node-express-course/blob/dc0635c55bf27ef77a8aeddf3570892480f2c899/06-jobs-api/final/app.js#L55
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:Then run again the server again :
npm start