This project was generated with Angular CLI version 16.1.3.
Fast, Unopinionated, Minimalist starter kit for Angular Universal 100% powered by Angular CLI.
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.
The main other difference is that you only need Angular CLI to kick off your next Angular Universal project:
ng build
- Building browser and server bundles ;ng serve
- Running ssr dev server ;ng serve -c spa
- Running ssr dev server with server side rendering disabled of 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
ng serve
Run ng serve
for a ssr dev server. Navigate to http://localhost:4000/
. The app will automatically reload if you change any of the source files.
Tip: run ng serve -c spa
to disable server side rendering of routes only.
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
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Run node dist/app/server/main.js
to start application built.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.