Benjamin McFerren Benjamin McFerren - 1 month ago 46
TypeScript Question

Hosting Angular2 on Heroku

I am having trouble finding a tutorial on how to host an angular2 application (hopefully with Typescript) on Heroku or any other hosting provider for that matter.

Ideally, I'd like to find a way to run this repo on Heroku but guidance on any angular2/typescript repo on Heroku would be helpful: https://github.com/auth0/angular2-authentication-sample

Any guidance or advise you can offer would be greatly appreciated

Answer

You will need server app/framework for that.

This repository contains files from Express generator app and Quick-start Angular 2 app.


I have one other example that is also ready for Heroku: express + angular 2 + Procfile ( needed by the Heroku ) + other libraries

You need an account on Heroku. Push this code as-is ( in both cases ).


Official repo from Angular2 ( server side rendering ) on Express: https://github.com/angular/universal-starter