Skip to content

Instantly share code, notes, and snippets.

@l33z3r
Created September 17, 2013 13:39
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 l33z3r/6594414 to your computer and use it in GitHub Desktop.
Save l33z3r/6594414 to your computer and use it in GitHub Desktop.
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>"
<!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