Preview just gave up the ghost


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

Not seeing any obvious errors. How to debug?


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


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