https://github.com/scaledrone/html5-javascript-push-notifications
Push JavaScript desktop notifications to browser from cURL using Scaledrone Realtime Messaging Service
https://github.com/scaledrone/html5-javascript-push-notifications
javascript javascript-desktop-notifications notifications scaledrone
Last synced: 9 months ago
JSON representation
Push JavaScript desktop notifications to browser from cURL using Scaledrone Realtime Messaging Service
- Host: GitHub
- URL: https://github.com/scaledrone/html5-javascript-push-notifications
- Owner: ScaleDrone
- Created: 2014-09-29T15:22:53.000Z (about 11 years ago)
- Default Branch: gh-pages
- Last Pushed: 2018-01-09T07:48:00.000Z (almost 8 years ago)
- Last Synced: 2025-03-26T03:04:51.781Z (9 months ago)
- Topics: javascript, javascript-desktop-notifications, notifications, scaledrone
- Language: JavaScript
- Homepage: https://www.scaledrone.com
- Size: 189 KB
- Stars: 6
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Scaledrone's cURL JavaScript Desktop Notifications
This is a very simple example of how to use the HTML5 Desktop Notifications API to send notifications from your server.
Beware that HTML5 Notifications are not supported by all browsers yet, you can get the latest list of supported browsers from [here](http://caniuse.com/#feat=notifications).
To send your own notifications create a new free account at [scaledrone.com](https://www.scaledrone.com/).
### Example
[https://scaledrone.github.io/html5-javascript-push-notifications/](https://scaledrone.github.io/html5-javascript-push-notifications/)
### Running
Clone this repository and run it using your favorite http server.
You can push a notification from Terminal using `cURL`:
```
curl -H "Content-Type: application/json" \
-X POST \
-d '{"title":"Important!", "body":"Dogecoin is going to the moon!", "icon":"logo.png"}' \
https://api2.scaledrone.com/KtJ2qzn3CF3svSFe/notifications/publish
```