This is a bare-bones PWA implementation. In particular, the ServiceWorker just caches blindly and opportunistically. You probably want to ensure some stuff gets cached and exempt some other stuff (e.g., API calls).
@konklone There was no 512x512 icon, which is needed to pass the Google Lighthouse audit, so I just blew up the icon that was in there. Likewise, scaled down for the smaller icons. Might be good to regenerate these from vector source, assuming that exists.
To test:
node app.js
Open http://localhost:2000 in Chrome
Open the developer tools and switch to the Audits tab
Select the Progressive Web App audit and click "Run Audits"
You should see everything passing except for HTTPS (which should be fixed on a real deploy)
This is a bare-bones PWA implementation. In particular, the ServiceWorker just caches blindly and opportunistically. You probably want to ensure some stuff gets cached and exempt some other stuff (e.g., API calls).
@konklone There was no 512x512 icon, which is needed to pass the Google Lighthouse audit, so I just blew up the icon that was in there. Likewise, scaled down for the smaller icons. Might be good to regenerate these from vector source, assuming that exists.
To test:
node app.js
http://localhost:2000
in Chrome