I have a project hosted on Heroku using Mongolab for storing data (MongoDB). I need to create 2 different DB instances: one for prod, one for dev.
Any idea how can I do and how I can tell my code which one to use?
Thanks
You should use a config variable (https://devcenter.heroku.com/articles/config-vars) to set the database url and then use the environment variable in your mongo initializer. Set one app to use the production url and a dev app to use the developer database url.