Skip to content

Deploying on Heroku

Tim Elfelt edited this page Dec 5, 2015 · 5 revisions

Register with Heroku and create an app: http://heroku.com/

Download the Heroku Toolbelt: https://toolbelt.heroku.com/

You also need an accessible MongoDB instance - you can try MongoHQ which has an easy setup.

Add your db to the production env file in server/config/env/production.js: db: 'mongodb://' + (process.env.DB_PORT_27017_TCP_ADDR || 'localhost') + '/my-awesome-demo', We will add your connection string next

$ git init #if no git yet
$ git add .
$ git commit -m "initial version"

$ heroku apps:create
$ heroku config:add NODE_ENV=production
$ heroku config:add DB_PORT_27017_TCP_ADDR=user:[email protected]:31426
$ git push heroku master
$ heroku config:set NODE_ENV=production

Then push your mean app to Heroku.

Clone this wiki locally