I know how to run a regular node.js app locally, using foreman, but when my app is linked to a MongoHQ database in Heroku, the connection is part of the heroku environment.
Is there a way I can test the application on my local machine?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Foreman will load environment variables specified in the
.envfile of your app. It’s in the Local setup section of the Configuration and Config Vars Dev Center article. There’s a plugin to Heroku toolbelt that lets you pull the config from your running app, if that’s what you want to use (you might also want to consider running a MongoDB server locally):