Server
Index
Constructors
Methods
Constructors
constructor
Returns Server
Methods
createRoom
Parameters
id: string
ID of the room
templateName: string
Name of the room template
Returns Room
The created room
define
Define a room template. This is used to create rooms.
Parameters
name: string
Name of the room template
template: typeof Room
Room class
optionalopts: unknown
Options to pass to Room.init
Returns void
destroyRoom
Destroy a room.
Parameters
room: Room
Room to destroy
Returns void
listen
Listen for connections on the specified port.
Parameters
port: number
Port to listen on
Returns void
Create a room with the specified template.