Preview just gave up the ghost


#1

I have an angular2 project in C9. It was building/executing/previewing just fine yesterday. Now on start (ng serve --host 0.0.0.0 --port 8080) it builds, deploys, message states: webpack: Compiled successfully. but when I attempt to preview I get:

angularcourse-karlkras.c9users.io unexpectedly closed the connection.

Not seeing any obvious errors. How to debug?


#2

unfortunately webpack-dev-server used by angular added strict host checking which doesn’t work for running behind proxies like c9user.io.
With the latest version of angular cli you need to pass --disable-host-check flag, see https://github.com/angular/angular-cli/issues/6070 Angularjs 2 project development with angular-cli for the related discusiion


#3

That’s not true anymore, you can now add the public hostname using the --public-host flag.