Possible faye bug?
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
var faye = require('faye'); | |
var client = new faye.Client('http://localhost:8000/'); | |
client.subscribe('/test', console.log); | |
client.publish('/test', 'Hello world.'); |
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
undefined has published a message to /test | |
bidmexivn4iaz2g5uwgrroq7a4dzdad has subscribed to /test |
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
var http = require('http'), | |
faye = require('faye'); | |
var server = http.createServer(), | |
bayeux = new faye.NodeAdapter({mount: '/'}); | |
bayeux.on('subscribe', function(id, channel) { | |
console.log(id + ' has subscribed to ' + channel); | |
}); | |
bayeux.on('publish', function(id, channel, data) { | |
console.log(id + ' has published a message to ' + channel); | |
}); | |
bayeux.attach(server); | |
server.listen(8000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment