import { default } from "https://deno.land/x/lume@v2.4.1/core/server.ts";
Constructors
new
default(options?: Partial<Options>)Properties
readonly
addr: Deno.Addr | undefinedThe local address this server is listening on.
events: Events<ServerEvent>
middlewares: Middleware[]
options: Options
Methods
Add a listener to an event
dispatchEvent(event: ServerEvent)
Dispatch an event
handle(request: Request, info: Deno.ServeHandlerInfo): Promise<Response>
Handle a http request event
start(signal?: Deno.ServeOptions["signal"])
Start the server
stop()
Stops the server
use(...middleware: Middleware[])
Register one or more middlewares