I'm trying to deploy my mean.js app to heroku. Somehow the app on heroku is loading a blank page. It seems like the angular app is not being loaded properly.
Possibly a problem with bower dependencies?
Please take a look at the blank heroku app.
The heroku logs show no errors. No angular errors either.
I would appreciate any help.
Then, create a new app on your Heroku account and name it the way you want. Mine will be called “angular-nestjs-demo”. Heroku needs a tiny bit of configuration before it can deploy our app. Go to your Heroku app, then Settings and find the “Config Vars” section and click on “Reveal Vars” button. Here you have to enter this key-value:
If your Heroku-hosted MEAN app is using a MongoDB then you need to install an add-on called MongoLab. Go to your app’s dashboard and click Get more addons… If your Heroku-hosted MEAN stack app requires MongoDB, add MongoLab as a free add-on.
The first step is to create a new app in Heroku. So, an easy way to do this is to go to your dashboard and use the UI created for this. Click on “Create new app” in the top-right corner. Let’s give our app a name, select the region, and click “Create app”. We will be redirected to a page like the below that shows us our options for how to deploy.
Go to your Heroku app, then Settings and find the “Config Vars” section and click on “Reveal Vars” button. Here you have to enter this key-value:
OK, I feel stupid.
It took me a while to realize that while my mean.js app is running in production mode, none of the client side javascript got loaded.
It turns out I needed to run grunt build (it's in the mean.js manual).
RTFM :-)
Go into the App settings from Heroku dashboard.
Go to Config Vars
Change Production to Development.
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