Zum Inhalt springen
Deutsch

Route

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Route = { handler: (request) => Promise<HttpResponse> | HttpResponse; kind: "terminal"; method: HttpMethod; } | { child: Route; kind: "path"; segment: string; } | { kind: "concat"; routes: ReadonlyArray<Route>; } | { child: Route; kind: "middleware"; middleware: Middleware; } | { authorize?: (request) => HttpResponse | null; connect: WebsocketConnectHandler; kind: "websocket"; } | { handler: (request) => Promise<HttpResponse> | HttpResponse; kind: "fallback"; } | { child: Route; kind: "cors"; settings: CorsRouteOptions; }

Defined in: src/http/Route.ts:90

Node type emitted by DSL builders like path(...), get(...). Internal representation is a tree that knows how to flatten into CompiledRoutes.