Don't get too confuse while connecting MongoDB
to Node.js because people use different ways to connect it
- after intalling dependencies and making .env file mention your connection link of mongodb and port in env file this way will also work when you deploy your project. just remove the mongodb compass link to mongodb atlas link.because on onrender and heroku you have to mention in in enviroment variables separately and below pic will help you to solve your doubts
Top comments (0)