Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bitpshr/holler
Holler sends desktop push notifications from the command line.
https://github.com/bitpshr/holler
Last synced: 14 days ago
JSON representation
Holler sends desktop push notifications from the command line.
- Host: GitHub
- URL: https://github.com/bitpshr/holler
- Owner: bitpshr
- License: wtfpl
- Created: 2012-12-15T04:58:09.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2023-02-11T00:47:06.000Z (almost 2 years ago)
- Last Synced: 2024-10-11T17:04:54.252Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 567 KB
- Stars: 296
- Watchers: 20
- Forks: 18
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Holler logo](logo.png?raw=true)
Holler sends [desktop push notifications](https://developer.mozilla.org/en-US/docs/Web/API/notification) from the command line using [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API).
[![npm version](https://badge.fury.io/js/%40bitpshr.net%2Fholler.svg)](https://badge.fury.io/js/%40bitpshr.net%2Fholler)
## Usage
1. Install the package.
```sh
$ npm i @bitpshr.net/holler -D
```
2. Create a `HollerServer` using an existing [Node HTTP server](https://nodejs.org/api/http.html).
```js
const http = require('http');
const HollerServer = require('@bitpshr.net/holler/server');
const server = http.createServer().listen(1337);
new HollerServer(server);
```
3. Include the client script as an ES6 module or as a script tag and create a new Holler Client.
```js
import HollerClient from '@bitpshr.net/holler/client';
new HollerClient('ws://localhost:1337');
``````html
new HollerClient('ws://localhost:1337');
```
4. Send [JavaScript push notifications](https://developer.mozilla.org/en-US/docs/Web/API/notification) using the `holler` CLI.
```sh
$ holler --url="ws://localhost:1337" --title="Hello" --body="Hello, world"
```
See all available CLI commands via `holler --help`.## Demo
![Holler demo](https://i.gyazo.com/c971f0ebd6190c6b32bb23800cb894be.gif)
## License
[WTFPL](http://www.wtfpl.net/)