Skip to content

Instantly share code, notes, and snippets.

@dmethvin
Created October 22, 2012 19:39
Show Gist options
  • Select an option

  • Save dmethvin/3933593 to your computer and use it in GitHub Desktop.

Select an option

Save dmethvin/3933593 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<head>
<title>Pusher Test</title>
<script src="http://js.pusher.com/1.12/pusher.min.js" type="text/javascript"></script>
<script type="text/javascript">
// Enable pusher logging - don't include this in production
Pusher.log = function(message) {
if (window.console && window.console.log) window.console.log(message);
};
// Flash fallback logging - don't include this in production
WEB_SOCKET_DEBUG = true;
var pusher = new Pusher('a159c09c7626e562dd5e');
var channel = pusher.subscribe('test_channel');
channel.bind('my_event', function(data) {
alert(data);
});
</script>
</head>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment