Created
September 17, 2013 13:39
-
-
Save l33z3r/6594414 to your computer and use it in GitHub Desktop.
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
pusher = new Pusher('8671ff0dd1fcbba4d00d') | |
channel = pusher.subscribe('lees-channel') | |
channel.bind "message-passed", (data) -> | |
$('#app_body').append "<div>An event was triggered with message: #{data.msg}</div>" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Pusher Basic Tutorial" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> | |
<script src="http://js.pusher.com/2.1/pusher.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>Pusher Example</title> | |
</head> | |
<body id="app_body"> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment