Skip to content

Instantly share code, notes, and snippets.

@erubboli
Created May 10, 2011 09:40
Show Gist options
  • Save erubboli/964185 to your computer and use it in GitHub Desktop.
Save erubboli/964185 to your computer and use it in GitHub Desktop.
Faye Server - nodejs
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