code: function (server) {
  
        // Retrieve the configured handler.
        if (handler) {
          handler = require(require('path').resolve() + '/' + handler);
        } else {
          console.log('No handler defined for websocket server, not starting websocket.');
          return;
        }
  
        // Attach websockets server to http server
        var WebSocketServer = require('websocket').server;
        var wsServer = new WebSocketServer({
          httpServer: server
        });
  
        // Handle requests
        wsServer.on('request', handler);
      }
docs: Attaches a websocket server to the specified http server.