Module

x/lume/core/server.ts>default

🔥 Static site generator for Deno 🦕
Very Popular
Go to Latest
class default
import { default } from "https://dotland.deno.dev/x/lume@v2.2.2/core/server.ts";

Constructors

new
default(options?: Partial<Options>)

Properties

events: Events<ServerEvent>
middlewares: Middleware[]
options: Options

Methods

addEventListener(
type: ServerEventType,
listener: EventListener<ServerEvent>,
options?: EventOptions,
)

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

Stops the server

use(...middleware: Middleware[])

Register one or more middlewares