Demo web app to demonstrate how to use Service Worker.
Part 1 demo: https://will-it-rain-today-c287a.firebaseapp.com/
This repo accompanies a two-part tutorial written for net magazine
In this two-part tutorial we’re going to show you how to progressively enhance your site or webapp with a Service Worker to give you faster loading times and offline support.
In part 1 we’re going to learn about Service Worker registration and set up a bare bones worker that will cache and serve our static assets, delivering a huge performance boost on subsequent loads.
Next month, in part 2, we’ll learn how to cache dynamic API responses and give our demo app full offline support.
The master
branch contains the starting point.
The tutorial
branch contains the completed tutorial. With each step flagged
with a tag. See below for more info.
If you're looking for part 2 you need the tutorial-2
branch.
If you missed part 1 you'll need to sign up for a free API key at https://openweathermap.org/ in order to access the weather data API.
Paste your API key into the index.html at the highlighted place, approx line 40.
Part 2 demo: https://will-it-rain-today-2.firebaseapp.com/
npm install
- Node 6.9.0 or higher
- npm 3 or higher
Development server
npm start
Create build
npm run build
Each step of the tutorial has been saved as a tag.
Open the Branch dropdown above, switch to the Tags tab and choose the step you want to see.
Made by Daniel Crisp - danielcrisp.com