reisneto / multiple-service-workers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

multiple-service-workers

How to test it

Create a server to open index.html

on vs code there is Live Server it is needed because service workers run on https or localhost.

Generate vapid keys

./node_modules/web-push/src/cli.js generate-vapid-keys --json

Get user subscription

  • Running the application, hit the subscribe button
  • When a notification appears, hit accept
  • open the chrome tools console and copy the user data
  • paste it at subLocal variable
    pushLocal.js
    pushExternal.js

About


Languages

Language:JavaScript 77.3%Language:HTML 19.1%Language:CSS 3.6%