An Angular 5+ Universal PWA starter app.
- Node (>= 8.0.0)
- Yarn
- Angular CLI
git clone https://github.com/bellizio/angular-universal-pwa.git
cd angular-universal-pwa
yarn install
Run npm start
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
- Run
npm run build:ssr
to build the project for production. - Run
npm run serve:ssr
to serve the production build.
- Run
ng test
to execute the unit tests via Karma.
- Run
ng e2e
to execute the end-to-end tests via Protractor.
By default, the production build uses a service worker generated by NGSW (Angular Service Worker).
To use a service worker generated by the Workbox CLI, do the following:
- In app.browser.module.ts, comment out the call to
ServiceWorkerModule.register()
and enable the call toregisterWorkboxSW()
- Run
npm run build:ssr
- Run
npm run sw:workbox
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.