How do you connect mlab to mern-starter?

Responses (1)

Join the discussion

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...

loading ...