Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Push events to pusher.com with Node.js
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README
index.js

README

Example
=======

var simple_pusher = require('./simple_pusher');

var config = {
  appId:  '1234',
  key:    '0aafake61807key8fe70',
  secret: '789fake2ac7esecretd9'
};

var channel = "pdq-orders";
var eventName = "purhcase";
var data = { price: 53.80, postalCode: '98072' };

simple_pusher.trigger(config, channel, eventName, data);

// You can also pass in a callback as the 5th argument to get the request
simple_pusher.trigger(config, channel, eventName, data, function(request) {
  request.addListener('response', function(response) {
    // Inspect the response, or something...
  })
});


Contributors
============
Dave Hoover, @redsquirrel
Michael Hines, @michaelphines


License
=======
This code is free to use under the terms of the MIT license.
Something went wrong with that request. Please try again.