maryamaljanabi / bestbags-nodejs-ecommerce

A responsive ecommerce website using Node js, Express js, and MongoDB
318 stars 206 forks source link

Mongo DB URI Credentials #41

Closed adkadle closed 4 months ago

adkadle commented 1 year ago

Hi

How do i provide credentials in the .env file as my Mongo DB requires Authentication

Regards

Dheeraj-08 commented 1 year ago
  1. Login to your MongoDB atlas account.
  2. Select Database item from the left menu .
  3. Click on Connect option.
  4. Select Compass and download it of not already installed.
  5. Copt the connection string.
  6. Replace with the password you set when user is created on MongoDB
  7. Assign the string to MONGO_URI in your .env file
maryamaljanabi commented 4 months ago

Thanks for the reply Dheeraj-08. I'm closing the thread since this answer provides all the required information.