I am attempting to deploy my project to Heroku following a particular guide (http://bytesofpi.com/post/20898722298/pushing-your-meteor-project-to-heroku)
One of the steps states that
var mongo_url = process.env.MONGOHQ_URL;
Needs to replace "MONGO_URL" in server/server.js.
The problem is I can't find that variable at all, the only mention of that variable is in the following code
// check for a valid MongoDB URL right away if (!process.env.MONGO_URL) throw new Error("MONGO_URL must be set in environment");
Does anybody have any experience with this, or know where to find "MONGO_URL in order to change it?
I would suggest that instead of using the article you mentioned as a guide that you do the following:
Use Meteorite to build and run your local Meteor projects:
Instructions are on that page.
Then use this buildpack:
Again, the README has how to create your app on Heroku (a one-liner)
The NOTE at the bottom of this README means that you need to verify your Heroku Account with a payment card so that you can add the mongohq:free add-on to your app. Once verified run:
heroku addons:add mongohq:sandbox
To add the db on Heroku.
Then the other step is to set the ROOT_URL for you app, type this inside your local app directory once the app is committed (only the first time):
heroku config:set ROOT_URL=<<domain of your app>>
Unless you are using a custom name <> will be something like
If you then run:
you will see that MONGOHQ_URL has been set alongside BUILDPACK_URL and ROOT_URL.