Skip to main content

Module config

Module config 

Source
Expand description

main.toml — the top-level server configuration.

Every field is optional: a missing file, or a file missing any given key, falls back to a safe default. The only piece of configuration that is inferred rather than declared is TLS: if the app directory contains an https/ folder with a cert + key, the server serves HTTPS.

§Environment variables

Any string value here — like any string in any of the app’s TOML files — may reference the environment: url = "$DATABASE_URL", port = "${PORT:-8080}". See crate::env for the syntax.

Structs§

AdminAiAssistanceConfig
Extra browser-side prompting that fills text fields through the app’s configured AI provider.
AdminConfig
The built-in admin dashboard, served from the binary itself.
AiConfig
An AI chat assistant: which service answers, and what to say to it.
AppConfig
What the app calls itself.
AuthConfig
CacheConfig
An optional Redis cache.
Config
Fully-resolved server configuration.
DatabaseConfig
DocsConfig
Interactive API documentation (OpenAPI spec + Swagger UI).
EmailConfig
Outbound email: which provider sends it, and the credentials to do so.
LogsConfig
How the process writes to its own stdout.
MetricsConfig
Metrics: the four numbers you page on, on the OpenTelemetry HTTP semantic conventions so a stock dashboard reads them without being taught the app.
OAuthConfig
Signing in with somebody else’s account.
OAuthProviderConfig
One provider’s credentials, and the overrides an unknown provider needs.
ObservabilityConfig
Logs, traces and metrics — what the server says about itself, and where it says it.
OrganizationConfig
The [organization] section: deployment-wide rules about the tenant itself.
OtlpConfig
Where the data goes.
PaymentsConfig
Payments: who takes the money, and how the checkout is set up.
PublicConfig
Static files served from the app’s public/ directory.
QueuesConfig
Background work: a message published now, handled by a function shortly after, outside the request that caused it.
RateLimitConfig
How many requests one client may make, before the API starts answering 429 Too Many Requests.
ServerConfig
SmtpConfig
SMTP transport settings, used only when provider = "smtp".
StorageConfig
Where uploaded files go.
TracesConfig
Distributed traces: one span per request, children for the work inside it.

Enums§

LogFormat
OtlpProtocol