Skip to content

Instantly share code, notes, and snippets.

@anubhavsinha
Last active February 17, 2017 06:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anubhavsinha/cd9e81d0877fd91b8f86df1d33568301 to your computer and use it in GitHub Desktop.
Save anubhavsinha/cd9e81d0877fd91b8f86df1d33568301 to your computer and use it in GitHub Desktop.
Getting started with Angular 2
#!/bin/bash
# Both the CLI and generated project have dependencies that require Node 6 or higher, together with NPM 3 or higher.
# On Ubuntu 16
# sudo apt-get update
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs # this installs both node and npm
# sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g @angular/cli
ng help
# sudo npm install extract-text-webpack-plugin@2.0.0-rc.0 --save-dev # https://github.com/angular/angular-cli/issues/4264
ng new world-domination # my new project
cd world-domination
#npm install # use npm install --no-optional if you are getting npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevent for npm --version 3.10.8
ng serve # You should get your app up and running on http://localhost:4200
# ng serve -host 0.0.0.0 # If you want to developing out on a ec2 for some reason. http://ec2ip:4200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment