Skip to main content
Module

x/abc/mod.ts>Application

A better Deno framework to create web application.
Go to Latest
class Application
Re-export
import { Application } from "https://deno.land/x/abc@v1.1.0/mod.ts";

Properties

middleware: MiddlewareFunc[]
premiddleware: MiddlewareFunc[]
renderer: Renderer | undefined
router: Router
server: Server | undefined
readonly
θprocess: Promise<void> | undefined

Unstable

Methods

add(
method: string,
path: string,
handler: HandlerFunc,
...middleware: MiddlewareFunc[],
): Application
any(
path: string,
): Application
close(): Promise<void>
connect(
path: string,
): Application
delete(
path: string,
): Application
file(
path: string,
filepath: string,
): Application

file registers a new route with path to serve a static file with optional route-level middleware.

get(
path: string,
): Application
group(prefix: string, ...m: MiddlewareFunc[]): Group

group creates a new router group with prefix and optional group level middleware.

head(
path: string,
): Application
match(
methods: string[],
path: string,
): Application
options(
path: string,
): Application
patch(
path: string,
): Application
post(
path: string,
): Application

pre adds middleware which is run before router.

put(
path: string,
): Application
start(sc: HTTPOptions): void

start starts an HTTP server.

startTLS(sc: HTTPSOptions): void

startTLS starts an HTTPS server.

static(
prefix: string,
root: string,
): Application

static registers a new route with path prefix to serve static files from the provided root directory.

trace(
path: string,
): Application

use adds middleware which is run after router.