Skip to content

KoaOptions

Defined in: koa.ts:29

optional app?: __module

Defined in: koa.ts:31

Existing Koa application instance. When omitted, a new one is created.


optional batch?: boolean | { maxSize?: number; path?: string; }

Defined in: koa.ts:42

Mount a batch endpoint (default POST /batch) dispatching a BatchCall[] body through app.batch() — every call runs its service’s full hook pipeline. On by default; false disables it, an object overrides the route path or max batch size (default 25).


optional cors?: boolean | CorsOptions

Defined in: koa.ts:48

Enable CORS via @koa/cors. true resolves to permissive defaults (reflects Origin, allows the CRUD verbs, no credentials); pass a CorsOptions object to customize origin/methods/headers/credentials. Disabled (no CORS headers) by default.


optional introspection?: boolean | { path?: string; }

Defined in: koa.ts:36

Mount an introspection endpoint (default GET /_services) returning a ServiceDescriptor[] for every registered service. Off by default.