Created
May 10, 2011 09:40
-
-
Save erubboli/964185 to your computer and use it in GitHub Desktop.
Faye Server - nodejs
This file contains hidden or 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 bayeux = new faye.NodeAdapter({ | |
mount: '/auctions', | |
timeout: 45 | |
}); | |
// Handle non-Bayeux requests | |
var server = http.createServer(function(request, response) { | |
response.writeHead(200, {'Content-Type': 'text/plain'}); | |
response.write('Hello, non-Bayeux request'); | |
response.end(); | |
}); | |
bayeux.attach(server); | |
server.listen(8000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment