Module

x/opine/mod.ts>IRouter

Fast, minimalist web framework for Deno ported from ExpressJS.
Go to Latest
interface IRouter
import { type IRouter } from "https://dotland.deno.dev/x/opine@2.2.0/mod.ts";

Properties

all: IRouterMatcher<this, "all">

Special-cased "all" method, applying the given route path, middleware, and callback to every HTTP method.

get: IRouterMatcher<this, "get">
post: IRouterMatcher<this, "post">
put: IRouterMatcher<this, "put">
delete: IRouterMatcher<this, "delete">
patch: IRouterMatcher<this, "patch">
options: IRouterMatcher<this, "options">
head: IRouterMatcher<this, "head">
checkout: IRouterMatcher<this>
connect: IRouterMatcher<this>
copy: IRouterMatcher<this>
lock: IRouterMatcher<this>
merge: IRouterMatcher<this>
mkactivity: IRouterMatcher<this>
mkcol: IRouterMatcher<this>
move: IRouterMatcher<this>
notify: IRouterMatcher<this>
propfind: IRouterMatcher<this>
proppatch: IRouterMatcher<this>
purge: IRouterMatcher<this>
report: IRouterMatcher<this>
subscribe: IRouterMatcher<this>
trace: IRouterMatcher<this>
unlock: IRouterMatcher<this>
unsubscribe: IRouterMatcher<this>
use: IRouterHandler<this> & IRouterMatcher<this>
params: any
_params: any[]
caseSensitive: boolean
mergeParams: boolean
strict: boolean
stack: any[]

Stack of configured routes

Methods

route(prefix: PathParams): IRoute
handle(): void

Dispatch a req, res pair into the application. Starts pipeline processing.

If no callback is provided, then default error handlers will respond in the event of an error bubbling through the stack.

param(name: string, fn: RequestParamHandler): void
process_params(
layer: any,
called: any,
): void