Push JavaScript desktop notifications to browser from cURL using Scaledrone Realtime Messaging Service
Clone or download
Latest commit 191ed15 Jan 9, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bower_components/push.js Try new SW approach1 Jan 9, 2018
README.md Update readme Jan 9, 2018
index.html Try new SW approach1 Jan 9, 2018
logo.png Update JS and start using Push.js Jan 9, 2018
main.js Try new SW approach1 Jan 9, 2018
package.json Update JS and start using Push.js Jan 9, 2018
push.min.js Try new SW approach1 Jan 9, 2018
serviceWorker.min.js Try new SW approach1 Jan 9, 2018

README.md

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.

To send your own notifications create a new free account at scaledrone.com.

Example

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