How do you connect mlab to mern-starter?

Write your response…

hi! did you resolve this? i can help. basically you set the MONGO_URL environment variable to the url you have been provided by mlab (eg: mongodb://<dbuser>:<dbpassword> in heroku this would be set by heroku config:set MONGO_URL=etcetcetc.

within the code, search "process.env.MONGO_URL" to see how it is used.

Write a reply...

Join a friendly and inclusive Q&A network for coders

  • 🖥Pick the technologies you like & read great content through your feed.
  • 💬Ask a question when you want to learn more about anything.
  • 🚀Share what you know & build your portfolio.
Sign up nowLearn more

loading ...