Created
June 25, 2020 10:52
-
-
Save velotiotech/d8c27960e2fac408a8db57b92f1e846d to your computer and use it in GitHub Desktop.
pusher client setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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