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

x/deno_nest/modules/hono/mod.ts>Router

Refer to nestjs to realize some common functions for Deno, support hono and oak
Latest
class Router
implements IRouter
import { Router } from "https://deno.land/x/deno_nest@v3.15.1/modules/hono/mod.ts";

Constructors

new
Router(options?: RouterOptions)

Properties

private
app: Hono
optional
keys: string[]

Methods

private
handle(fn: MiddlewareHandler)
delete(path: string, fn: MiddlewareHandler)
get(path: string, fn: MiddlewareHandler)
notFound(fn: NotFoundHandler): void
patch(path: string, fn: MiddlewareHandler)
post(path: string, fn: MiddlewareHandler)
put(path: string, fn: MiddlewareHandler)
routes(): void
serveForStatic(staticOptions: StaticOptions)
startServer(options: ListenOptions)
use(fn: MiddlewareHandler)