Skip to main content
Module

x/cav/mod.ts>Stack

A server framework for Deno
Go to Latest
interface Stack
Re-export
import { type Stack } from "https://deno.land/x/cav@0.0.8/mod.ts";

An http.Handler that routes requests to Rpcs or other Handlers. Stacks are one of two fundamental building blocks of Cav server applications, the other being Rpcs. If a matching handler or Rpc throws the special NO_MATCH error, the stack continues looking for matching handlers to process the request into a response. Stacks can capture path groups while routing the request; the captured groups will become the basis for the ResolverArg's groups property inside a matching Rpc (before parsing).

Call Signatures

(req: Request, connInfo: http.ConnInfo): Promise<Response>

Properties

readonly
routes: R

The StackRoutes object used to construct this stack.