docs: function ServerNode(opts) {
  
      opts = opts || {};
  
      /**
       * ### ServerNode.defaultConfDir
       *
       * The directory of execution of the server
       */
      this.rootDir = path.resolve(__dirname, '..');
  
  
      // Creates the http or https server (must be after rootDir is set).
      this.createServer(opts);
  
      /**
       * ### ServerNode.http
       *
       * The server
       */
      this.http = exp;
  
      /**
       * ### ServerNode.port
       *
       * Default port for server
       */
      this.port = 8080;
  
      /**
       * ### ServerNode.version
       *
       * The software version of the server as a string
       */
      this.version = require(path.resolve(this.rootDir, 'package.json')).version;
  
      /**
       * ### ServerNode.nodeGameVersion
       *
       * The official release version of nodeGame
       *
       * This includes all other modules, and it is passed by the launcher.
       *
       * Default: ServerNode.version
       */
      this.nodeGameVersion = opts.nodeGameVersion || this.version;
  
      /**
       * ### ServerNode.modulesVersion
       *
       * Versions of all nodegame submodules
       *
       * This includes all other modules, and it is passed by the launcher.
       *
       * Default: ServerNode.version
       */
      this.modulesVersion =
          require(path.join(this.rootDir, 'bin', 'info.js')).modulesVersion;
  
      /**
       * ### ServerNode.defaultConfDir
       *
       * The directory from which the default configuration files are located
       *
       * @see ServerNode.rootDir
       */
      this.defaultConfDir = path.join(this.rootDir, 'conf');
  
      /**
       * ### ServerNode.channels
       *
       * Object containing references to all the existing channels
       *
       * @see ServerChannel
       */
      this.channels = {};
  
      /**
       * ### ServerNode.defaultChannel
       *
       * The name of the default channel (will be served from '/')
       *
       * @see ServerChannel
       */
      this.defaultChannel = null;
  
      /**
       * ### ServerNode._defaultChannel
       *
       * The name of the default channel as specified by options
       *
       * Needs to be distinguished at load time.
       */
      this._defaultChannel = opts.defaultChannel || null;
  
      /**
       * ### ServerNode.rooms
       *
       * Object containing references to all existing game rooms in all channels
       *
       * @see GameRoom
       */
      this.rooms = {};
  
      /**
       * ### ServerNode.info
       *
       * Object containing global information about games and channels
       *
       * Games actually include also aliases.
       *
       * @see ServerNode.loadGames
       */
      this.info = {
          channels: {},
          games: {},
          aliases: {}
      };
  
      /**
       * ### ServerNode.defaults
       *
       * Defaults settings for the server and the channels
       *
       * Will be populated by the configure function.
       */
      this.defaults = {};
  
      /**
       * ### ServerNode.gamesDirs
       *
       * Array of directories that will be sequentially scanned for games
       */
      this.gamesDirs = [];
  
      /**
       * ### ServerNode.scannedGamesDirs
       *
       * Keeps tracks of games directories already scanned and of the outcome
       */
      this.scannedGamesDirs = {};
  
      /**
       * ### ServerNode.logger
       *
       * Default logger before any configuration is loaded.
       *
       * Does not print anything.
       */
      this.logger = winston;
      if (opts.logLevel) {
          if (opts.logLevel !== 'error' &&
              opts.logLevel !== 'warn' &&
              opts.logLevel !== 'info' &&
              opts.logLevel !== 'verbose' &&
              opts.logLevel !== 'debug' &&
              opts.logLevel !== 'silly') {
  
              throw new Error('ServerNode constructor: invalid logLevel: ' +
                              opts.logLevel);
          }
      }
      this.logger.level = opts.logLevel || 'warn';
  
      /**
       * ### ServerNode.debug
       *
       * If TRUE, errors will be thrown, otherwise caught and logged.
       */
      this.debug = false;
  
      /**
       * ### ServerNode.asyncQueue
       *
       * Object containing callbacks to be executed if no operation is in progress
       */
      this.asyncQueue = J.getQueue();
  
      /**
       * ### ServerNode.sio
       *
       * The Socket.IO app of the server.
       *
       * The app is shared with all the channels.
       */
      this.sio = socket_io.listen(http);
  
      // see http://nodejs.org/docs/latest/
      //            api/events.html#events_emitter_setmaxlisteners_n
      this.sio.sockets.setMaxListeners(0);
  
      /**
       * ### ServerNode.gameLoader
       *
       * Object responsible to load the games from the file system.
       */
      this.gameLoader = new GameLoader(this);
  
      /**
       * ### ServerNode.page
       *
       * Loading, caching of static resources and templates from file system.
       */
      this.resourceManager = new ResourceManager(this);
  
      /**
       * ### ServerNode.logDir
       *
       * Log directory
       */
      this.logDir = path.join(this.rootDir, 'log');
  
      /**
       * ### ServerNode.lastError
       *
       * Last error caught by error manager
       */
      this.lastError = null;
  
      /**
       * ### ServerNode.acm
       *
       * Access control from channels on servernode
       *
       * Important! Currently, acm is not enforced, all channels have access
       * to ServerNode and can modify it. Do not rely on this in production!
       *
       * @experimental
       */
      this.acm = {
          read: {},
          modify: {}
      };
  
      // Loading configurations.
      this.init(opts || {});
  }