Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including splush with all npm packages installed. Try it out:

var splush = require("splush")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

splush v0.1.1

splush npm

javascript driver for splush

splush-web

getting started

click here!

usage

cli

splush config (thing) (value)

configures (thing) with the provided (value)

thing's to configure:

  • key - key used for pushing notifications for a given device, get it from here
  • upstream - (default https://splush.nikerino.com) - configures the endpoint to push to, useful if you're running your own splush node

example: splush config key MassiveGroundLeafUnder

splush push (optional: msg)

Creates a new push notification, optionally with the given (msg).

example: splush push Good morning!

splush help (command)

Prints this text.

module

// reads config from ~/.splush.json
const splush = require('splush')()

// can be passed a custom key
const splush = require('splush')('MassiveGroundLeafUnder')

// ...or an options object
const splush = require('splush')({
    key: 'MassiveGroundLeafUnder',
    upstream: 'http://localhost:3030'
})

splush.push('hello!')

splush([options])

Spawns a new splush instance, options are read from ~/.splush.json if not provided.

.push([msg])

Creates a new push notification, optionally with the given (msg).

install

cli

# npm install -g splush

module

$ npm install --save splush

license

MIT

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free