After having start with Angular Universal on this tuto :
https://coursetro.com/posts/code/68/Make-your-Angular-App-SEO-Friendly-(Angular-4-+-Universal)
I would like to know what is the next step for deploy my app to Heroku (or other). I have search a lot but i didn’t find a concrete tutorial that explain me how to do it properly. Does anyone have a good source ?
Thank you in advance
2
Answers
One thing that might help you (which I ran into) is making sure your devDependencies are installed on Heroku. For that you must run:
as described here https://devcenter.heroku.com/articles/troubleshooting-node-deploys
I released a full tutorial on getting an Angular Universal app going with Heroku here
The Universal Starter repo was my base for the project. I made a few tweaks including adding a
Procfile
, and making sure to add a propertpostinstall
script so that Heroku can perform some building once you push the repo.From there, it’s as simple as:
git init
heroku login
heroku create
git add .
git commit -m "initial commit"
git push heroku master
My Medium article explains this in greater detail.
I’ve also set up a repo with the ready-made changes here
Hope that helps!