Skip to content
Node library for Pusher API
Find file
New pull request
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib Pusher.trigger - make socketId optional
.gitignore first release
index.js first release

A node library for Pusher API


$ npm install node-pusher

How to use

var Pusher = require('node-pusher');

var pusher = new Pusher({

var channel = 'lobby';
var event = 'message';
var data = {
  from: 'Jaewoong',
  content: 'Hello, World'

// (optional) socket_id is used to prevent getting message for myself
var socket_id = '1302.1081607';

pusher.trigger(channel, event, data, socket_id, function(err, req, res) {
  // do something (this callback is optional)

// auth function returns the object with the auth field which can be returned from our sever
// to authorize the socket to subscribe to a private or presence channel
pusher.auth(socket_id, channel, channelData);


This library is based on the work of Christian Bäuerlein and his library pusher


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

Something went wrong with that request. Please try again.