basalt / express/src / ExpressPluginOptions
Interface: ExpressPluginOptions
Defined in: express/src/index.ts:378
Properties
allowUnguardedMeta?
> optional allowUnguardedMeta?: boolean | string[]
Defined in: express/src/index.ts:389
Waives the boot-time check that every route declaring security meta (auth, can, teamRole) has a registered guard enforcing it. Pass true to waive everything (e.g. authentication handled at an outer edge/gateway), or an array of specific keys. Default: fail loud at boot. It never waives the route-meta validators plugins register (META_VALIDATORS_BUCKET, e.g. teamsPlugin refusing an unknown meta.teamRole) — those also run at boot and fail it.
app?
> optional app?: Express
Defined in: express/src/index.ts:391
Bring your own Express app; otherwise one is created with express.json().
bodyLimit?
> optional bodyLimit?: number
Defined in: express/src/index.ts:398
Maximum size, in bytes, of a JSON or form body the adapter parses; a larger one is answered 413. Default: 1 MiB (DEFAULT_BODY_LIMIT), the same as Fastify and Hono — body-parser's own default is 100 KiB. upload() and rawBody() routes carry their own limits.
errorHandler?
> optional errorHandler?: boolean
Defined in: express/src/index.ts:419
Mount a final error middleware that turns errors raised outside a route (malformed/oversized bodies, a failing pre-hook) into the neutral JSON envelope instead of Express's default HTML page, which includes the stack trace unless NODE_ENV=production. Default: true. Pass false only if you mount your own (err, req, res, next) handler after boot.
notFound?
> optional notFound?: boolean
Defined in: express/src/index.ts:411
onError?
> optional onError?: HttpErrorReporter
Defined in: express/src/index.ts:410
Where failed requests are reported. Default: 5xx via console.error (with the stack) and 4xx via console.warn, prefixed [basalt:http]. Pass your own to route them into a real logger, or () => {} to silence them.
routes?
> optional routes?: BasaltRoute[]
Defined in: express/src/index.ts:379