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

x/hono/router/static-router/index.ts>StaticRouter

Ultrafast web framework for Cloudflare Workers, Deno, and Bun. Fast, but not only fast.
Very Popular
Go to Latest
class StaticRouter
implements Router<T>
import { StaticRouter } from "https://deno.land/x/hono@v2.6.2/router/static-router/index.ts";

Constructors

new
StaticRouter()

Properties

middleware: Record<string, Result<T>>
routes: Record<string, Record<string, Result<T>>>

Methods

private
newRoute(): Record<string, Result<T>>
add(
method: string,
path: string,
handler: T,
)
match(method: string, path: string): Result<T> | null