Last active
June 11, 2022 09:15
-
-
Save Ifejeremiah/78164f5ec8715b49ad86c61fbb244028 to your computer and use it in GitHub Desktop.
Express and Angular commands in building a new full stack project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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