git clone https://github.com/tejashreeSalvi/Mongodb-connect.git
npm i
- This will download dependencies required to run the code.
- Create a account on MongoDB Atlas
- Create a Cluster
- After Cluster is created In Data Storage, Go to Clusters -> Click on connect
- Choose the Connection Method: Click on Connect your application
- Driver : NodeJS and copy the link and paste in app.js file
- CONNECTION_STRING replace with mongoDB Link
- In terminal: Run
npm start