🔔 Firebase Push Notification Test Client
Ready to initialize Firebase...
📨 Notification Log
Waiting for notifications...
⚠️ Important Setup Requirements
This must be served from a web server, not opened as a file!
Service workers don't work with file:// URLs.
Quick Setup Options:
Option 1 - Python (if installed):
python -m http.server 8000
Then visit: http://localhost:8000
Option 2 - Node.js (if installed):
npx serve .
Then visit the provided URL
Option 3 - VS Code:
Install "Live Server" extension, right-click HTML file → "Open with Live Server"
📖 Instructions:
- Serve this file from a web server (see options above)
- Get your Firebase config from Firebase Console → Project Settings → General → Your apps
- Get your VAPID key from Firebase Console → Project Settings → Cloud Messaging → Web Push certificates
- Paste both into the fields above
- Click "Initialize Firebase"
- Click "Request Permission" to allow notifications
- Click "Get FCM Token" to generate your device token
- Use the token to send test notifications from Firebase Console or your backend