Note: Support for Push Notifications on IOS is available from version 16.04 onwards, and needs to be enabled in Settings -> Safari -> Advanced Options -> Notifications (mark as enabled).
- Available in
demo-push-notifications.vercel.app
. - After accessing and allowing notifications receiving, send a notification request to the server.Example:
curl -X POST https://demo-push-notifications-server.vercel.app/notification/push/send -H "Content-Type: application/json" -d '{"title": "Test 1", "body": "Notification Test"}'
- "Title" and "Body" are the only mandatory properties. The list with all properties including optional is available here.
- Clone the repository
git clone https://github.com/lucasdemoraesc/push-notifications-demo.git
- Install dependencies
npm install # In the project root folder
-
Setup environment variables:
- Copy server/src/.env.example to server/src/.env
- Replace placeholder values in the copied file.
- A set of Vapid Keys can be generated here.
-
Start the client application
npm start:client # In the project root folder
- Start the server application
npm start:server # In the project root folder