-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
I am trying to get my angular 2 + express app to reload itself when either the express code changes or the angular 2 app changes. My understanding is that I need to run ng build, then have express serve up the index.html file that is located in the dist/ folder.
ng serve is probably the only way to auto-reload, but I'm hoping for a 3rd party app or an option to ng build that would make it rebuild when the angular 2 code changes.
The best I can do right now is ng serve and just test the angular part. Or making an npm build script that looks like ng build && nodemon server.js which will build angular 2, and auto reload if the express code changes (but not the angular 2 code).
Thanks for any tips on how to get this done, I'm very new to angular 2.
OS?
Ubuntu
Versions.
angular-cli: 1.0.0-beta.28.3
node: 7.2.0
os: linux x64
@angular/common: 2.4.5
@angular/compiler: 2.4.5
@angular/core: 2.4.5
@angular/forms: 2.4.5
@angular/http: 2.4.5
@angular/platform-browser: 2.4.5
@angular/platform-browser-dynamic: 2.4.5
@angular/router: 3.4.5
@angular/compiler-cli: 2.4.5
Repro steps.
ng build