Skip to content

Instantly share code, notes, and snippets.

@rachitpsolanki
Created November 12, 2019 07:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rachitpsolanki/6036f48d8e373186267fadf6a169a27e to your computer and use it in GitHub Desktop.
Save rachitpsolanki/6036f48d8e373186267fadf6a169a27e to your computer and use it in GitHub Desktop.
pusher client setup
// Here my-channel is the channel name
// all the event published to this channel would be available
// once you subscribe to the channel and start listing to it.
var channel = pusher.subscribe('my-channel');
channel.bind('my-event', function(data) {
alert('An event was triggered with message: ' + data.message);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment