6

So after changing around files and shifting code in my MEAN stack app, I've finally got it to load on Heroku local. Now the problem is when I push this app to my Heroku remote and ask to Heroku open, the app has this error....

Failed to load resource: the server responded with a status of 503 (Service Unavailable)

Below is the link to the app on Heroku...Can any help or hint me in the right direction?

https://istressless.herokuapp.com/

Kandianne Pierre
  • 314
  • 1
  • 5
  • 17
  • 1
    You need to look at your app logs, which will give you information on what's happening: https://devcenter.heroku.com/articles/logging – Damien MATHIEU Oct 06 '15 at 09:32
  • I have a similar issue but heroku logs also returns: Expected response to be successful, got 503 – Marc Mar 06 '17 at 09:56

2 Answers2

7

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

practicalli-john
  • 1,836
  • 1
  • 12
  • 8
0

Try to type:

heroku logs --tail

on your local terminal to see the error details

Simas Joneliunas
  • 2,890
  • 20
  • 28
  • 35
Raphael
  • 43
  • 5