zuixjs / zuix-html-pwa

Progressive Web App template with a responsive, touch-first layout.
https://zuixjs.github.io/zuix-html-pwa/
MIT License
159 stars 54 forks source link

Service worker does not get registered #1

Closed patriklindstrom closed 6 years ago

patriklindstrom commented 6 years ago

I have tryed to run itlocally with npm run start and also with nodejs /express. But after checking the (Chrome F12 - Application ) It is not registred.

Here I am running it with Node server.js See eg http://cb-dev1.northeurope.cloudapp.azure.com:3003 .

See forked repo https://github.com/patriklindstrom/zuix-html-pwa/tree/feature/restyle

patriklindstrom commented 6 years ago

It could have to do that I am not using https https://developers.google.com/web/fundamentals/primers/service-workers/

Trying to fix that https://www.sitepoint.com/how-to-use-ssltls-with-node-js/

genemars commented 6 years ago

Service workers only start on trusted sites using HTTPS protocol . The only way to make a Service Worker work over HTTP is by addressing it from localhost.

Example: http://localhost:8080