Uploaded successfully to Heroku Local but getting 503 error once pushed to Heroku live

Once you have created a new heroku app with heroku create then ensure you have added a database and configured your Mean app with the settings defined on mean.io

To add a MongoDB database to your Heroku app with:

heroku addons:create mongolab:sandbox

Add the Mongodb string to the production env in server/config/env/production.js. You can find this string using the command heroku config

Configure your Mean app on heroku by setting some environment variables

heroku config:add BUILDPACK_URL=https://github.com/mbuchetics/heroku-buildpack-nodejs-grunt.git

heroku config:add NODE_ENV=production

Adding a new configuration variable should redeploy your app and hopefully start your Mean application on Heroku.

All this assumes you have the Heroku toolbelt installed and your local code is under git version control.

This information is from the Heroku section of the learn.mean.io website

Leave a Comment