@bitpshr.net/holler

1.2.1 • Public • Published

Holler logo

Holler sends desktop push notifications from the command line using WebSockets.

npm version

Usage

  1. Install the package.

    $ npm i @bitpshr.net/holler -D
  2. Create a HollerServer using an existing Node HTTP server.

    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.

    import HollerClient from '@bitpshr.net/holler/client';
    new HollerClient('ws://localhost:1337');
    <script src="node_modules/@bitpshr.net/holler/client.js"></script>
    <script>new HollerClient('ws://localhost:1337');</script>
  4. Send JavaScript push notifications using the holler CLI.

    $ holler --url="ws://localhost:1337" --title="Hello" --body="Hello, world"

    See all available CLI commands via holler --help.

Demo

Holler demo

License

WTFPL

Package Sidebar

Install

npm i @bitpshr.net/holler

Weekly Downloads

2

Version

1.2.1

License

WTFPL

Unpacked Size

26.5 kB

Total Files

6

Last publish

Collaborators

  • bitpshr