File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1+ // https://developers.google.com/web/updates/2015/05/notifying-you-of-changes-to-notifications
2+ // https://felixgerschau.com/web-push-notifications-tutorial/
3+ // https://developers.google.com/web/fundamentals/codelabs/push-notifications
14const webpush = require ( 'web-push' ) ;
25
36// VAPID keys should be generated only once with:
@@ -25,8 +28,5 @@ webpush.setVapidDetails(
2528// }
2629// };
2730
28- const pushSubscription =
2931const notification = { title : `Hello at ${ ( new Date ( ) ) . toISOString ( ) } ` } ;
30-
31-
32- webpush . sendNotification ( pushSubscription , ) ;
32+ webpush . sendNotification ( pushSubscription , JSON . stringify ( notification ) ) ;
Original file line number Diff line number Diff line change 22
33yarn create react-app web-push-api-example --template typescript
44required Node.js version >= 14
5+
6+
7+ # Notification does not always show as banner.
8+ Turn of focus assist
You can’t perform that action at this time.
0 commit comments