A simple example of a Web Push Notification website and backend.
- run
node vapid.js
- This will get your private and public keys from google servers and WRITE a .env file - run
npm install
- now run
npm start
- browse to http://localhost:5000 and agree to receive notications (You can navigate to your computers IP from a phone or other device to get notifications there also)
You need a "server side" a way to "SEND NOTIFICATIONS"
you do that by simply navigating over to: http://localhost:5004/notify
which will send the notification to your other window. (or if you close it will pop up a notifice message on the right of your computer or top or your phone.
See slides and presentation from my talk at the South Florida Code Camp Conference and the BocaJS Developer Group https://docs.google.com/presentation/d/1-pkdU-Ol26OpuISnqPzFne5LW7flGOMWYxIw9HrlIqQ