Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created June 25, 2020 10:52
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 velotiotech/d8c27960e2fac408a8db57b92f1e846d to your computer and use it in GitHub Desktop.
Save velotiotech/d8c27960e2fac408a8db57b92f1e846d 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