Skip to content

lucasdemoraesc/push-notifications-demo

Repository files navigation

Push notifications


Angular PWA Node.js

Demonstration of push notifications with angular and node.

Demo 🔗



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).

📨 Demo

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.

🔧 Local setup

  1. Clone the repository
git clone https://github.com/lucasdemoraesc/push-notifications-demo.git
  1. Install dependencies
npm install # In the project root folder
  1. 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.
  2. Start the client application

npm start:client # In the project root folder
  1. Start the server application
npm start:server # In the project root folder

🧩 Used Technologies