Last Updated: February 25, 2016
·
1.134K
· raulraja

Connect to a Mongolab Heroku DB

Add this to your ~/.bash_profile

function heroku_mongolab {

    URI=`heroku config --app $1 | grep "MONGOLAB_URI:" | sed 's/MONGOLAB_URI://g'`
    mongoctl connect $URI

}

Then use like this...

herokumongolab *appname*

It assumes you have mongoctl and the heroku toolbelt installed in your system.

https://github.com/mongolab/mongoctl

https://toolbelt.heroku.com/

OSZAR »