Angular Server Side Rendering with Nest.js Schematics
This project was generated with Angular CLI version 8.3.19.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
[RxJS]https://rxjs-dev.firebaseapp.com/)
NPM Command | Yarn Command | Description (wherever necessary) |
---|---|---|
npm install | yarn yarn install |
Will install packages listed in the package.json file |
npm install pkg-name npm install --save pkg-name |
yarn add pkg-name |
By default Yarn adds the pgk-name to package.json and yarn.lock files |
npm install [email protected] |
yarn add [email protected] |
|
npm install pkg-name --save-dev |
yarn add pkg-name --dev |
|
npm install pkg-name --peer |
yarn add pkg-name --peer |
|
npm install pkg-name --optional |
yarn add --optional | |
npm install -g pkg-name |
yarn global add pkg-name |
Careful, yarn add global pkg-name adds packages global and pkg-name locally! |
npm update | yarn upgrade | Note: It's called upgrade in yarn |
npm uninstall pkg-name |
yarn remove pkg-name |
|
npm run script-name |
yarn run script-name |
|
npm init | yarn init | |
npm pack | yarn pack | Creates a compressed gzip archive of the package dependencies |
npm link | yarn link | |
npm outdated | yarn outdated | |
npm publish | yarn publish | |
npm run | yarn run | |
npm cache clean | yarn cache clean | |
npm login | yarn login (and logout) | |
npm test | yarn test | |
npm install --production | yarn --production | |
npm --version | yarn version | |
npm info | yarn info |
Yarn Command | Description |
---|---|
yarn why pkg-name |
Builds a dependency graph on why this package is being used |
yarn clean | Frees up space by removing unnecessary files and folders from dependencies |
yarn licenses ls | Inspect the licenses of your dependencies |
yarn licenses generate-disclaimer | Automatically create your license dependency disclaimer |
npm install -g @angular/cli
yarn global add @angular/cli
npm install -g typescript
yarn global add typescript
npm install -g firebase-tools
yarn global add firebase-tools
npm install -g npm-check-updates
yarn global add npm-check-updates
The style option specifies what CSS preprocessor is used in building the project. the options are: css, scss, less, sass, styl.
The routing option generates a file app-routing.module.ts file.
This skip-install option disables the npm install after code generation.
When true, does not initialize a git repository.
When true, creates a project without any testing frameworks. (Use for learning purposes only.)
ng new angular-ssr-nestjs --routing --style=scss --skip-install --skip-git --minimal=true
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Add the following to the .gitignore file
# node
package-lock.json
# yarn
yarn.lock
yarn-error.log
# Firebase
.firebase/*
firebase-debug.log
ng add @nestjs/ng-universal
xhr2 bufferutil utf-8-validate
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.