NameSummary
handle Registers a handler function for a given URI path.
listen Starts the HTTP server on the specified address.
fn handle(path, handler) -> null
Registers a handler function for a given URI path.
Parameters
pathThe URL path to handle (e.g. '/')
handlerFunction(request, response) to call.
Returns
null
fn listen(addr) -> result<null>
Starts the HTTP server on the specified address.
Parameters
addrThe network address to listen on (e.g. ':8080')
Returns
result<null>