docs: function setupLogic(mixinConf) {
      var game, node, dataDir;
  
      game = this.getClientType('logic', mixinConf);
  
      mixinGameMetadata.call(this, game);
  
      node = this.node;
  
      node.game.memory.setWD(this.dataDir, true);
  
      // Stop logic if necessary.
      if (node.game.isStoppable()) node.game.stop();
  
      // Setup must be called before connect.
      node.setup('nodegame', game);
  
      // Connect logic to server, if not already connected. E.g., after a stop
      // command it is generally still connected. Or the node object can be
      // passed in the constructor and be already connected.
      if (!node.socket.isConnected()) {
          node.socket.setSocketType('SocketDirect', {
              socket: this.channel.adminServer.socketManager.sockets.direct
          });
          node.connect(null, {
              startingRoom: this.name,
              clientType:   'logic'
          });
      }
  }