diff --git a/adev/src/content/ecosystem/service-workers/getting-started.md b/adev/src/content/ecosystem/service-workers/getting-started.md index bd839492867..ec89a81aae2 100644 --- a/adev/src/content/ecosystem/service-workers/getting-started.md +++ b/adev/src/content/ecosystem/service-workers/getting-started.md @@ -37,7 +37,24 @@ The CLI project is now set up to use the Angular service worker. ## Service worker in action: a tour This section demonstrates a service worker in action, -using an example application. +using an example application. To enable service worker support during local development, use the production configuration with the following command: + + + +ng serve --prod + + + +Alternatively, you can use the [`http-server package`](https://www.npmjs.com/package/http-server) from +npm, which supports service worker applications. Run it without installation using: + + + +npx http-server -p 8080 -c-1 dist/<project-name>/browser + + + +This will serve your application with service worker support at http://localhost:8080. ### Initial load