https://dashboard.heroku.com/apps/YOUR-APP/settings
Create a new database in Mongo Atlas.
https://www.mongodb.com/cloud/atlas
Get the driver key from 'connect' button.
Add mongo driver key from mongo atlas to the heroku config var as MONGODB_KEY. and done !
MONGODB_KEY : mongodb+srv://<user>:<password>@cluster0.b8dz.mongodb.net/urlshortner?retryWrites=true&w=majority