Installing dependencies

The dependency for entire project can be downloaded using the following command

npm install

Start the Client App

Once installed, you can start the client app with the following command

npm start

This will start the client app at localhost:9999.

Start the Server App

node server/app.js

References

Use Notification Generator demo to test the client notification subscription workflow

Customize the Notification options object

API documentation of Clients interface

API documentation for clients.openWindow

API documentation on clients.matchAll

API documentation for PushManager.subscribe

API documentation of Service Worker getNotifications

API documentation of Service Worker showNotifications

API documentation of ServiceWorkerRegistration

API Reference for webPush.sendNotification

Usage Example for FakerJS helpers.createTransaction

W3 Spec on Service Worker event.waitUntil

W3 Spec on Page Visibility