Skip to content

Instantly share code, notes, and snippets.

@anand9
Created March 2, 2013 10:09
Show Gist options
  • Save anand9/5070379 to your computer and use it in GitHub Desktop.
Save anand9/5070379 to your computer and use it in GitHub Desktop.
Faye monitor which receives messages from all clients
<script type="text/javascript">
var client = new Faye.Client('http://localhost:9292/faye');
client.subscribe('/foo', function(message) {
$('#message').append('<p>'+message.number+ ' => ' +message.text+ '</p>'); // doing the UI stuff :)
$('#id').text(message.id);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment