A push notifications example code, for my talk Push Notifications For The Masses
Slides: https://www.slideshare.net/barakdrechsler/push-notifications-for-the-masses
- run
npm i
- start the client server
npm start
- genertae public & private server keys for your push notifciations encryption
npm generate-keys
updatemain.js
with your generated key. - create a firebase app, and get your firebase CLOUD MESSAGING server key.
- run
npm start-server
and enter your keys when prompted. - in order to send your self a notification, send
post
request tohttp://localhost:3000/push
with your message content.