Skip to content

Instantly share code, notes, and snippets.

@Ifejeremiah
Last active June 11, 2022 09:15
Show Gist options
  • Select an option

  • Save Ifejeremiah/78164f5ec8715b49ad86c61fbb244028 to your computer and use it in GitHub Desktop.

Select an option

Save Ifejeremiah/78164f5ec8715b49ad86c61fbb244028 to your computer and use it in GitHub Desktop.
Express and Angular commands in building a new full stack project
EXPRESS :
- Install express generator globally :
$ npm install -g express-generator
- Generate express app, with Pug as view engine :
$ express --view=pug --git
- Generate express app, with NO VIEW, basically from API development :
$ express --no-view --git
- Install all pkgs :
$ npm install
ANGULAR :
- Install latest version of Angular on local machine, globally :
$ npm install -g @angular/cli
- Install a particular Angular version :
$ npm install @angular/[email protected]
- Create new workspace, skip git repo, tests, and make default :
$ ng new [PROJECT NAME] --skipGit=true --skipTests=true --defaults=true
- Run the application, on port 4200 :
$ cd [PROJECT NAME]
$ ng serve
- Run application on specific port :
$ ng serve --port=3000
- Generate angular components :
$ ng generate component [ COMPONENT NAME ]
$ ng g c components/login
$ ng g service services/auth
$ ng g guard guards/auth
- Build for production :
$ ng build [BUILD PATH]
$ ng b build
OR :
$ ng b ; in this case, you define the --output-path in the angular.json file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment