It is a Chrome Application availible in Chrome Store, which creates HTTP server in Chrome that catch all requests on port (by deafult 8989) and proxies it as options to chrome.notifications.create. So you can use Chrome browser as a Notification server from your application.
From external application you should send http request to localhost:8989. 8989 - is default port and you can change it in chrome application settings (launch button). Http request can use any method (server is not a real http). Request body should be JSON of the following form:
{
"command" : "string",
"data" : "string"
}For now there are two available commands:
ping- in response your get a string "chrome-notification-server" (can be used to determine that server exists). "data" parameter should be an empty string.notification- shows chrome notification. "data" parameter should be a valid options object for chrome.notifications.create API. The only difference is that if theiconUrlproperty does not exist there is no error and default icon is used. If you want your own image you can seticonUrlas data URI string.
- Install chrome application from chrome store. Launch it and choose the port.
- Send http request from somewhere, for example
curl:
curl --data '{"command":"notification","data": { "type":"basic", "title":"Message", "message":"Hello!" } }' localhost:8989That's all, notification will be shown. For example of working with Chrome Notification Server from node checkout folder examples.
Create zip archive:
grunt productionCopyright (c) 2015 Mityakov Aleksandr.
Released under the MIT license.