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§

AdminConfig
The built-in admin dashboard, served from the binary itself.
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.
PublicConfig
Static files served from the app’s public/ directory.
ServerConfig
SmtpConfig
SMTP transport settings, used only when provider = "smtp".