Skip to content

redsquirrel/simple_pusher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

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.

About

Push events to pusher.com with Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published