Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A simple node.js publisher lib for pusher.com
JavaScript
branch: geeklist-v2

This branch is 4 commits ahead, 9 commits behind fabrik42:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
.npmignore
README.md
index.js
package.json

README.md

Pusher

Pusher is a simple node.js publisher lib for pusher.com.

Installation

Pusher is available on npm.

$ npm install pusher

Usage

var Pusher = require('pusher');

var pusher = new Pusher({
  appId:  'YOUR_PUSHER_APP_ID',
  appKey: 'YOUR_PUSHER_APP_KEY',
  secret: 'YOUR_PUSHER_SECRET_KEY'
});

var channel = pusher.channel('sync');

var data = { name: "Joe", message_count: 23 };

channel.trigger('message', data, function(err, request, response) {
  // do something (this callback is optional)
});

Enjoy! :)

Credits

This lib is based on the work of Dave Hoover aka redsquirrel and his lib simple_pusher.

License

This code is free to use under the terms of the MIT license.

Something went wrong with that request. Please try again.