Service Worker test repository. This is a simple demo showing basic service worker features. The demo can be seen on our GitHub pages.
You can learn more about how this works by reading using service workers. In particular, read "Why is my service worker failing to register?" if you are having problems getting your code to do anything. You need to change the paths relative to where you are serving your files!
To get this code running locally on your computer as-is, you need to do the following:
- Ensure that you have Nodejs installed. The best way to do this is either using
nvm
ornvm-windows
. - Clone the repo in a location on your machine.
- Start a local server in the root of this directory using
lite-server
.npx lite-server .
- When the server starts, the `index.html`` page will open in your default browser.