Created
March 2, 2013 10:09
-
-
Save anand9/5070379 to your computer and use it in GitHub Desktop.
Faye monitor which receives messages from all clients
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
<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