Skip to content

This is an out of the box working example for Web Push Notifications. It consists of a client with a service worker to register for push messages and a simple server, which is using the web-push lib and VAPID to send the notification.

License

Notifications You must be signed in to change notification settings

Ojabrane/service-worker-web-push-example

 
 

Repository files navigation

Web Push API Example including Service Worker and minimalistic Application Server

This is an out of the box working example for Web Push Notifications. It consists of a client with a Service Worker to register for push messages and a simple application server, which is using the web-push lib and VAPID to send the notification.

Getting Started

  • clone the repo and install dependencies
  • run 'npm run serve` for the client
  • run 'npm run start` for the server in parallel
  • go to http://localhost:8080 and read on there

Prerequisites

  • Node.js 14 or higher
  • some latest browsers

About

This is an out of the box working example for Web Push Notifications. It consists of a client with a service worker to register for push messages and a simple server, which is using the web-push lib and VAPID to send the notification.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 62.6%
  • HTML 31.6%
  • CSS 5.8%