##Angular CLI (ng serve)
To run the standard angular-cli ng serve
on a Cloud9 box, you need to specify the cloud9 specific ports the preview runs off as well as define a live preview port. So instead of the angular-cli command of ng serve
, run the following:
ng serve --host 0.0.0.0 --port 8080 --live-reload-port 8081
The port configuration is the important part to make sure it is accessible to preview. Once running, preview the App as per usual in Cloud9 via the "Preview" button (no need to use the "Run" button).
To make things easier, you can assign that command to an alias: