Config

Config

Object containing the following properties:

PropertyType
lobbies (*)Object with properties:
  • regions: Array<string>
  • destroyOnEmptyAfter: number
  • unreadyExpireAfter: number
  • maxPlayers: number
  • maxPlayersDirect: number
  • enableDynamicMaxPlayers: Object with properties:
    • min: number
    • max: number
  • enableDynamicMaxPlayersDirect: Object with properties:
    • min: number
    • max: number
  • enableCreate: boolean
  • enableDestroy: boolean
  • enableFind: boolean
  • enableFindOrCreate: boolean
  • enableJoin: boolean
  • enableList: boolean
  • backend: Object with properties:
    • test: Object with properties:
      , Object with properties:
      • localDevelopment: Object with properties:
        • version: string
        • tags: Record<string, string>
        • maxPlayers: number
        • maxPlayersDirect: number
        • ports: Object with dynamic keys of type string and values of type Object with properties:
          • protocol: 'http' | 'tcp' | 'udp'
          • hostname: string
          • port: number
      or Object with properties:
      • server: Object with properties:
        • resources: Object with properties:
          • cpu: number
          • memory: number
        • arguments: Array<string>
        • environment: Record<string, string>
        • networkMode: 'bridge' | 'host'
        • ports: Object with dynamic keys of type string and values of type Object with properties:
          • protocol: 'http' | 'tcp' | 'udp' | 'https' | 'tcp_tls'
          • internalPort: number
          • routing: Object with properties:
            • game_guard: Record<string, never>
            • host: Record<string, never>
    lobbyRules (*)Array of objects:
    • tags: Record<string, string>
    • config: Object with dynamic keys of type string and values of type unknown (optional & nullable)
    players (*)Object with properties:
    • maxPerIp: number
    • maxUnconnected: number
    • unconnectedExpireAfter: number
    • autoDestroyAfter: number

    (*) Required.

    Default Config

    {
        "lobbies": {
            "regions": [
                "atl",
                "fra"
            ],
            "destroyOnEmptyAfter": 60000,
            "unreadyExpireAfter": 300000,
            "maxPlayers": 16,
            "maxPlayersDirect": 16,
            "enableCreate": false,
            "enableDestroy": false,
            "enableFind": true,
            "enableFindOrCreate": true,
            "enableJoin": true,
            "enableList": true
        },
        "lobbyRules": [],
        "players": {
            "maxPerIp": 8,
            "maxUnconnected": 128,
            "unconnectedExpireAfter": 60000,
            "autoDestroyAfter": 4147200000
        }
    }