Skip to content

GameServerOptions

optional games?: string

Folder of games, one .html file each (names: letters, digits, “-” and “_”). Default: the current folder.


optional limits?: Partial<Limits>

Room limits (players, rooms, sizes, rates); see DEFAULT_LIMITS.


optional saves?: string | SavePort

Where saved profiles and worlds go: a folder (file saves) or your own SavePort. Default: none, a restart forgets them.


optional secret?: string | Buffer<ArrayBufferLike>

Signs the players’ pass cookies. Keep it the same across restarts so players keep their seats and saves. Default: random per process.


optional secure?: boolean

Mark the pass cookie Secure (set this when the site is served over https).


optional title?: string

Heading of the game list page.


optional trustProxy?: boolean

Behind a proxy on this machine or a private network (Caddy, nginx): take each player’s address from X-Forwarded-For, so the per-address limits count players, not the proxy. Only believed from private or loopback peers.