question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

io configure - socket io v1.X

See original GitHub issue

What is the example configuration for do this in socket io v1.X.X ?

//this is configuration for socket.io v0.9.X<
io.configure('production', function () {
        io.enable('browser client minification');
        io.enable('browser client etag');
        io.enable('browser client gzip');
        io.set('log level', 1);
        io.set('transports', ['websocket', 'flashsocket', 'htmlfile', 'xhr-polling', 'jsonp-polling']);
    });

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:31 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
dstrootcommented, Jun 1, 2014

This DOES NOT work (wish I knew what did!):

var app         = module.exports = express(); 
var server      = require('http').createServer(app);
var io          = require('socket.io')(server, {
  'browser client minification': true,  // Send minified client
  'browser client etag': true,          // Apply etag caching logic based on version number
  'browser client gzip': true,          // Gzip the file
  'browser client expires': true        // Adds Cache-Control: private, x-gzip-ok="", max-age=31536000 header
});
0reactions
rauchgcommented, Jan 5, 2015

But adding a note about it in the guide sounds like a great idea.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server options - Socket.IO
IO server options​. path ​. Default value: /socket.io/. It is the name of the path that is captured on the server side.
Read more >
Client API - Socket.IO
This is documentation for Socket.IO 3.x, which is no longer actively maintained. For up-to-date documentation, see the latest version (4.x).
Read more >
Server API - Socket.IO
Version: 4.x. On this page ... const io = new Server(httpServer, { // options }); io.on("connection", (socket) => { ... Added in v1.0.0....
Read more >
Client Installation | Socket.IO
2.x, NO, YES, YES 1, YES 1 ... io will be registered as a global variable: ... By setting localStorage.debug = 'socket.io-client:socket' ...
Read more >
Server Initialization | Socket.IO
IO server library, you can now init the server. ... Please note that if perMessageDeflate is set to false (which is the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found