Skip to content

Instantly share code, notes, and snippets.

@gabamnml
Created January 14, 2013 18:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabamnml/4532176 to your computer and use it in GitHub Desktop.
Save gabamnml/4532176 to your computer and use it in GitHub Desktop.
socket.io config for production
io.configure('production', function(){
console.log("Running Socket.io in production mode");
io.enable('browser client minification'); // send minified client
io.enable('browser client etag'); // apply etag caching logic based on version number
io.enable('browser client gzip'); // gzip the file
io.set('log level', 1); // reduce logging
io.set('transports', [ // enable all transports (optional if you want flashsocket)
'websocket'
, 'flashsocket'
, 'htmlfile'
, 'xhr-polling'
, 'jsonp-polling'
]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment