Push a web notification to the browser.
Generate web-push
VAPID keys .\node_modules\.bin\web-push.cmd generate-vapid-keys [--json]
Default config config/default.json
:
{
"webPush": {
"publicKey": "",
"privateKey": ""
},
"notifyDatabase": {
"user": "",
"host": "",
"database": "",
"password": "",
"port": 5432
}
}
- Desktop: the browser needs to be opened for the notification to show.
- Mobile: Even with the browser closed you will get the notification. However you will get a second notification saying the app has changed in the background.
If you're not willing to pay $99 for Apple Developer Program, then no notifications for Safari users
- Safari 7 (OS X 10.9 or later required) for testing,
- A website under HTTPS protocol,
- Apple Developer Program account for registering a Website Push ID
- Tutorial: samuil.hakoniemi.net
- Safari push notifications: developer.apple.com