Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fastro/mod.ts>HttpServer

Fast and simple web application framework for deno
Go to Latest
class HttpServer
implements Fastro
Re-export
import { HttpServer } from "https://deno.land/x/fastro@v0.74.0/mod.ts";

Constructors

new
HttpServer(options?: { port?: number; })

Properties

finished: () => unknown
onListen: (handler: ListenHandler) => unknown
record: Record<string, any>
serve: (options?: { port: number; }) => unknown

Methods

delete(path: string, ...handler: Array<HandlerArgument>)
get(path: string, ...handler: Array<HandlerArgument>)
head(path: string, ...handler: Array<HandlerArgument>)
options(path: string, ...handler: Array<HandlerArgument>)
page(
path: string,
element: Component,
...handlers: MiddlewareArgument[],
): Fastro
patch(path: string, ...handler: Array<HandlerArgument>)
post(path: string, ...handler: Array<HandlerArgument>)
push(
method?: string,
path?: string,
...handler: Array<HandlerArgument>,
)
put(path: string, ...handler: Array<HandlerArgument>)
static(path: string, options?: { maxAge?: number; folder?: string; })
use(...handler: HandlerArgument[])