monorepo
monorepo copied to clipboard
Add push notifications w/next-pwa
This commit addresses issue #618, and implements push notifications using next-pwa and web-push.
To test this feature please follow these steps:
-
Generate VAPID keys using
yarn web-push generate-vapid-keys [--json]
and -
Add your generated keys and email to the
.env
file in the following format:
- [email protected]
- WEB_PUSH_PRIVATE_KEY=your-vapid-private-key
- NEXT_PUBLIC_WEB_PUSH_PUBLIC_KEY=your-vapid-public-key
NOTE: To enable the app to run as a PWA, the site.webmanifest
file has been renamed to manifest.json
.