Skip to main content
Module

x/danet/mod.ts>DanetHTTPRouter

The most mature backend framework for Deno. Create awesome HTTP and WebSocket server as well as KVQueue workers !
Go to Latest
class DanetHTTPRouter
Re-export
import { DanetHTTPRouter } from "https://deno.land/x/danet@2.3.1/mod.ts";

Constructors

new
DanetHTTPRouter(
injector: Injector,
guardExecutor?: GuardExecutor,
filterExecutor?: FilterExecutor,
viewRenderer?: Renderer,
router: Application,
)

Properties

private
logger: Logger
private
methodsMap: Map<string, HandlerInterface>
private
middlewareExecutor: MiddlewareExecutor
optional
prefix: string

Methods

private
handleError(
executionContext: ExecutionContext,
error: any,
Controller: ControllerConstructor,
ControllerMethod: (...args: any[]) => unknown,
)
private
sendResponse(
response: string | Record<string, unknown>,
ControllerMethod: Callback,
context: HttpContext,
)
createRoute(
handlerName: string | hookName,
Controller: Constructor,
basePath: string,
)
handleRoute(Controller: ControllerConstructor, ControllerMethod: Callback)
registerController(Controller: Constructor, basePath: string)
setPrefix(prefix: string)