Technical requirements
To follow along in this chapter, you’ll need the following:
- Angular v19+
- RxJS v7
- Node.js v22+ and npm v11+
- RxDB
- NestJS v11+
- Dexie.js
The code for the recipes in this chapter is placed in the GitHub repository here: https://github.com/PacktPublishing/RxJS-Cookbook-for-Reactive-Programming/tree/main/Chapter07.
To convert an Angular application to a PWA, we can run one simple command that will add all the necessary configurations and a basic service worker to our project:
ng add @angular/pwa
Since service workers are one of the requirements for an app to be a PWA and enabled only in production mode, we must build our app and serve it locally to observe each recipe in action. In each recipe, we will use the simple http-server
library to host the client app locally and observe the offline mode in the browser by running the following command in the terminal:
npm run build && http-server...