Skip to main content
zerotal

Documentation


Documentation / zerotal / index / RoutingEntry

Type Alias: RoutingEntry

RoutingEntry = string | { file: string; prefix?: string; middleware?: MiddlewareInput; }

Defined in: packages/core/src/application/Application.ts:87

A single entry in a routing() config map.

Short form (string): just the file path — defaults apply for "web" and "api" keys. Long form (object): explicit file + optional prefix/middleware overrides.

Built-in defaults: "web" → prefix: "", middleware: ["web"] "api" → prefix: "/api", middleware: ["api"] Custom keys must declare both prefix and middleware explicitly.