Write your answer…
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>@ds131041.mlab.com:31041/heroku_t7pj6x5j). 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.
The Dev Community
Free, friendly and inclusive platform for developers
Or connect with