five-on-it / apps/server/src/http / createGameHttp
Function: createGameHttp()
createGameHttp(
options):object
Defined in: apps/server/src/http.ts:240
The endpoints and the WebSocket routing of one game server.
Parameters
options
Returns
onConnection
onConnection: (
connection,path) =>Promise<void>
Routes a new connection by its path: the default room, or a room by id with its token.
Parameters
connection
path
string
Returns
Promise<void>
onRequest
onRequest: (
req,res) =>Promise<void>
Parameters
req
IncomingMessage
res
ServerResponse
Returns
Promise<void>