Nesula
1.0.0
1.0.0
  • Introduction
  • Overview
    • First steps
    • Architecture
    • Authentication
    • Authorization
    • Routing
    • Meta
    • Mail
    • Security
      • Content Security Policy
    • Configuration
    • Service Worker
    • Logger
  • Development
    • Angular
    • NestJS
  • Nesula Devops
    • Nesula Setup
      • Files: Git
      • Database: Postgres
      • Server: Nginx
      • .Env & environment.ts
      • SSL
      • Build & Serve
    • Deployment
      • Deploy: Development
      • Deploy: Staging
      • Deploy: Production
    • Installation [ Old ]
  • Developer Setup
    • Visual Studio Code
      • Extensions
      • Run & Debug: Launch.json
      • Remote SSH
    • Chrome
    • Postman
  • Server Setup
    • Ubuntu Server Setup
      • Settings
      • Security
      • Users
    • App Server Setup
    • Node.js Hello World
    • Command Line
Powered by GitBook
On this page

Was this helpful?

  1. Overview

Service Worker

PWA Service Worker Configuration

PreviousConfigurationNextLogger

Last updated 3 years ago

Was this helpful?

Service workers in the browser aloow the Progressive Web Application (PWA) functionality.

To activate a service worker in angular config:

angular.json
"serviceWorker": true;

The configuration of the service worker is in two files:

  1. ngsw.config.json

  2. manifest.webmanifest

Angular Service workers can trigger asset loading issues in the browser e.g. fonts. Ensure your security policy in NestJS is configured correctly with Helmet & CORS in:

/nest-api/src/main.ts

GitHub - helmetjs/helmet: Help secure Express apps with various HTTP headersGitHub
Helmet configuraton options
GitHub - expressjs/cors: Node.js CORS middlewareGitHub
CORS configruation options
Logo
Logo