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 -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -