covenix / ServeOptions
Interface: ServeOptions
Defined in: src/express.ts:59
Options for serve — ToExpressOptions plus where to listen.
Extends
Properties
after?
optionalafter?: (app) =>void
Defined in: src/express.ts:55
Runs after routes but before the error handler — e.g. a SPA fallback (app.get('{*path}', …)) that must sit after the API routes.
Parameters
app
Express
Returns
void
Inherited from
app?
optionalapp?:Express
Defined in: src/express.ts:23
An existing Express app to build onto. Defaults to a fresh express(). Use this to layer covenix onto an app you've already partly configured.
Inherited from
configure?
optionalconfigure?: (app) =>void
Defined in: src/express.ts:50
Runs before routes (and before the body parsers) — the place for pre-route middleware: CORS, helmet, logging, static files, header-based auth. Note: fires before body parsing, so middleware needing a parsed body must add its own parser here.
Parameters
app
Express
Returns
void
Inherited from
docs?
optionaldocs?:boolean|ServeDocsOptions&object
Defined in: src/express.ts:38
Serve the docs UI via Covenix.serveDocs. true (default) mounts at /docs; an object customizes path and the UI options; false skips it.
Inherited from
errorHandler?
optionalerrorHandler?:boolean|RequestHandler<ParamsDictionary,any,any,ParsedQs,Record<string,any>>
Defined in: src/express.ts:43
Install an error handler last. true (default) uses covenixErrorHandler; a function installs your own; false skips it.
Inherited from
host?
optionalhost?:string
Defined in: src/express.ts:63
Host/interface to bind. Defaults to all interfaces.
json?
optionaljson?:boolean|OptionsJson
Defined in: src/express.ts:28
Mount express.json(). true (default) uses defaults; an object passes body-parser options (e.g. { limit: '1mb' }); false skips it.
Inherited from
port?
optionalport?:number
Defined in: src/express.ts:61
Port to listen on. Defaults to 3000.
urlencoded?
optionalurlencoded?:boolean|OptionsUrlencoded
Defined in: src/express.ts:33
Mount express.urlencoded(). false (default) skips it; true uses { extended: true }; an object passes body-parser options.
