Skip to main content
zerotal

Documentation


Documentation / zerotal / config-reexport / AppConfigShape

Interface: AppConfigShape

Defined in: packages/core/src/config/AppConfig.ts:108

The fully resolved app configuration as held in the config store.

Properties

name

name: string

Defined in: packages/core/src/config/AppConfig.ts:111

Human-readable application name.


env

env: string

Defined in: packages/core/src/config/AppConfig.ts:113

Runtime environment string. Mirrors APP_ENV.


key

key: string

Defined in: packages/core/src/config/AppConfig.ts:115

Application secret key used for signing sessions / tokens.


debug

debug: boolean

Defined in: packages/core/src/config/AppConfig.ts:117

Show verbose error pages and stack traces.


url

url: string

Defined in: packages/core/src/config/AppConfig.ts:119

Canonical public URL (e.g. https://myapp.com).


port

port: number

Defined in: packages/core/src/config/AppConfig.ts:121

Default HTTP port. Overridden by --port CLI flag. Default: 3000


locale

locale: string

Defined in: packages/core/src/config/AppConfig.ts:123

Application locale used for date/number formatting. Default: 'en'


timezone

timezone: string

Defined in: packages/core/src/config/AppConfig.ts:125

Application timezone. Default: 'UTC'


http3

http3: boolean

Defined in: packages/core/src/config/AppConfig.ts:129

Enable HTTP/3 over QUIC. Requires a valid tls config. Default: false


tls?

optional tls?: AppTlsConfig

Defined in: packages/core/src/config/AppConfig.ts:131

TLS certificate + key for HTTPS. Enables HTTPS when set.


maxRequestBodySize

maxRequestBodySize: number

Defined in: packages/core/src/config/AppConfig.ts:143

Largest request body the server will accept, in bytes. Default: 8 MiB.

Bodies are fully buffered before a handler sees them — a multipart upload materialises every file in RAM before ctx.file() reads a byte — so this is the ceiling on memory a single request can claim. Bun's own default is 128 MiB, which twenty concurrent POSTs turn into 2.5 GB resident on any route, authenticated or not.

Raise it for an app that genuinely accepts large uploads, and prefer raising it on the upload route's proxy rather than globally.


health

health: boolean | HealthConfigShape

Defined in: packages/core/src/config/AppConfig.ts:160

Health endpoint configuration. Pass an object to configure it (enabled / path / secret / showDetails); enabled defaults to on outside production. A bare true/false is shorthand for enable/disable with the other defaults. Default: false.

Example

health: {
  enabled: true,                 // default: !production
  path: "/health",              // default: '/health'
  secret: env("HEALTH_KEY"),    // required in production
  showDetails: true,            // false → bare { "status": "ok" }
}

cors

cors: AppCorsConfig

Defined in: packages/core/src/config/AppConfig.ts:164

CORS defaults applied by CorsMiddleware when registered without explicit options.


throttle

throttle: AppThrottleConfig

Defined in: packages/core/src/config/AppConfig.ts:166

Rate-limit defaults applied by ThrottleMiddleware.


secureHeaders

secureHeaders: AppSecureHeadersConfig

Defined in: packages/core/src/config/AppConfig.ts:168

Security-header defaults applied by SecureHeadersMiddleware.


assets?

optional assets?: AppAssetsConfig

Defined in: packages/core/src/config/AppConfig.ts:172

Front-end asset bundling, built on serve. Omitted means no asset build.


conventions

conventions: ConventionsConfig

Defined in: packages/core/src/config/AppConfig.ts:176

Auto-discovery settings (enabled + per-concern paths).