code: function socketUnit (server) {
    var io = server.io;
    // Client-side: <script src="/$socket.io/socket.io.js"></script>
  
    return function socketLayer (req, res, next) {
      // Socket.io doesn't care about anything but /$socket.io now.
      if (req.path.slice(1, 11) !== '$socket.io') next();
    };
  }
docs: Socket.io unit.