What is the correct way to use mongodb on heroku -



What is the correct way to use mongodb on heroku -

i have app hosted on heroku on vps. using mongodb on app mongoid. want know right way define database connection in mongoid.yml same file works on both heroku , vps. heroku expects mongohq_url in production database while vps needs default db mapping:

correct heroku: production: uri: <%= env['mongohq_url'] %> right vps: production: <<: *defaults host: localhost database: grbr_production

pushing mongoid.yml separately heroku , vps real pain. there way can create 1 unified entry works

it might easiest add together mongohq_url environment variable vps points mongodb instance on localhost:

mongodb://localhost/grbr_production

mongodb heroku mongoid

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -