Skip to content

Instantly share code, notes, and snippets.

@kenmazaika
Last active May 12, 2017 00:12
Show Gist options
  • Save kenmazaika/ca666fba85f1510f340c99b74790f864 to your computer and use it in GitHub Desktop.
Save kenmazaika/ca666fba85f1510f340c99b74790f864 to your computer and use it in GitHub Desktop.

Angular 4 / Cloud9

Environment Setup

The Node type of a work space contains a very out of date version of node, so you'd need to update it anyway. Because of this, I suggest creating a new Blank workspace.

In the instance update node:

nvm install 7.9.0

Then install the angular client.

npm install -g @angular/cli

Running the Server

Regarding this Webpack issue you need to make a hot-change to webpack in the node modules. Replace node_modules/webpack-dev-server/lib/Server.js from this:

if(this.disableHostCheck) return true;

To this:

return true;

Save the file.

Start the server with this command:

ng serve --host 0.0.0.0 --port 8080

Angular 4 / Vagrant

To start your server, use the following command:

ng serve --port 3000 --host 0.0.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment