Created
August 29, 2011 16:54
-
-
Save thejhh/1178818 to your computer and use it in GitHub Desktop.
Configuring socket.io
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 express = require('express'); | |
| var app = module.exports = express.createServer(); | |
| var io = require('socket.io').listen(app); | |
| io.configure('development', function(){ | |
| io.set('log level', 1); | |
| io.set('transports', ['xhr-polling', 'websocket']); | |
| }); | |
| io.configure('production', function(){ | |
| io.set('log level', 1); | |
| io.set('transports', ['websocket', 'xhr-polling']); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment