Last active
December 22, 2016 14:03
-
-
Save mattallan/992228a1cd204107b903e47562df3e1e to your computer and use it in GitHub Desktop.
Example Pusher Listener
This file contains hidden or 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
<!DOCTYPE html> | |
<head> | |
<title>Pusher Test</title> | |
<script src="https://js.pusher.com/3.2/pusher.min.js"></script> | |
<script> | |
// Enable pusher logging - don't include this in production | |
Pusher.logToConsole = true; | |
var pusher = new Pusher('8ffa40e2d51c6786802e'); | |
var channel = pusher.subscribe( 'batch.128' ); | |
channel.bind( 'batch.updated', function(data) { | |
console.log( data.message ); | |
}); | |
</script> | |
</head> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment