This project was generated with Angular CLI version 11.2.4.
Angular Universal 100% powered by Angular CLI
Angular Universal 100% powered by Angular CLI.Fast, Unopinionated, Minimalist starter kit for
Unlike the Official Angular Universal starter kit and other Awesome Universal Seed Projects, this starter kit is universal 100% which means you developing for both browser and server at the same time.
ng build- Building bundles for both browser and server platforms in same compilation ;
ng serve- Running universal dev server with Hot Module Replacement (HMR) enabled on browser and server sides ;
ng serve -c spa- Running universal dev server with Server Side Rendering (SSR) disabled for angular routes only.
In other words, this starter kit gives superpower for those who want develop universal application fastly with no pain. Just keep in mind with great power comes great responsibility (Universal Gotcha's).
git clone https://github.com/enten/angular-universal cd angular-universal npm install ./node_modules/.bin/ngcc ng serve
ng serve to start universal dev server. Navigate to http://localhost:4000/.
The app will automatically hot-reload on server and browser sides if you change any of the source files.
The full compilation will automatically restart if a hot chunk can't be applied on server side.
ng serve -c spa to disable server side rendering of routes only.
ng generate component component-name to generate a new component. You can also use
ng generate directive|pipe|service|class|guard|interface|enum|module.
ng build to build the project. The build artifacts will be stored in the
ng build --prod for a production build.
node dist/app/server/main.js to start application built.
Running unit tests
ng test to execute the unit tests via Karma.
Running end-to-end tests
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 Overview and Command Reference page.