Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blank page on Heroku - mean.js angular app

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.

like image 805
eshaham Avatar asked Jun 09 '14 08:06

eshaham


People also ask

How to deploy angular-nestjs on Heroku?

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:

How do I install MongoLab on Heroku mean?

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.

How to deploy an app in Heroku?

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.

How to reveal VARs in Heroku?

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:


2 Answers

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 :-)

like image 153
eshaham Avatar answered Sep 21 '22 19:09

eshaham


Go into the App settings from Heroku dashboard.

Go to Config Vars

Change Production to Development.

like image 45
ChrisM Avatar answered Sep 23 '22 19:09

ChrisM