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/
"Application Error" or similar is always caused by your own application code. Routing errors will normally only surface themselves within the logs of your application. In most cases, you will be able to see the cause of the error there. To learn more about logging, please see our Logging article on DevCenter.
Start your app locally using the heroku local command, which is installed as part of the Heroku CLI. Your app should now be running on http://localhost:5000/.
The HyperText Transfer Protocol (HTTP) 503 Service Unavailable server error response code indicates that the server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded.
So start heroku logs --tail in one shell or command prompt and then run the deploy step in another window, and you should see logs appear in the first, hopefully with an error that we can then solve.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With