Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 962 Bytes

README.md

File metadata and controls

15 lines (12 loc) · 962 Bytes

Web-Push-Example

A simple example of a Web Push Notification website and backend.

Steps to build on your box.

  1. run node vapid.js - This will get your private and public keys from google servers and WRITE a .env file
  2. run npm install
  3. now runnpm start
  4. 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)

Send notifications

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