Skip to main content

Interface: ServeOptions

Options for configuring the HTTP server.

Properties

fetch

fetch: FetchHandler

Handler function called for each incoming HTTP request.


listenIp?

optional listenIp: string

IP address to bind to. Defaults to '0.0.0.0'.


port?

optional port: number

Port to listen on. Defaults to 0 (random available port).


websocket?

optional websocket: WebSocketHandlers

Optional WebSocket event handlers for upgraded connections.