Skip to main content
Module

x/abc/mod.ts>Abc

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

Constructors

new
Abc()

Properties

middleware: MiddlewareFunc[]
premiddleware: MiddlewareFunc[]
renderer: Renderer
router: Router
server: Server

Methods

private
transformResult(c: Context, h: HandlerFunc): Promise<void>
add(
method: string,
path: string,
handler: HandlerFunc,
...middleware: MiddlewareFunc[],
): Abc
any(
path: string,
): Abc
close(): void
connect(
path: string,
): Abc
delete(
path: string,
): Abc
file(
path: string,
filepath: string,
): Abc

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

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

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

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

pre adds middleware which is run before router.

put(
path: string,
): Abc
start(addr: string | ServerConfig): Promise<void>

start starts an HTTP server.

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

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

trace(
path: string,
): Abc

use adds middleware which is run after router.