Skip to main content
Module

x/acorn/router.ts>RouteHandler

A focused RESTful server framework for Deno 🌰🦕
Go to Latest
interface RouteHandler
import { type RouteHandler } from "https://deno.land/x/acorn@0.3.0/router.ts";

The interface for route handlers, which are provided via a context argument. The route handler is expected to return a RouteResponse or undefined if it cannot handle the request, which will typically result in a 404 being returned to the client.

Type Parameters

ResponseType
optional
BodyType = unknown
optional
Params extends Record<string, string> = Record<string, string>