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§
- Admin
Config - The built-in admin dashboard, served from the binary itself.
- AppConfig
- What the app calls itself.
- Auth
Config - Cache
Config - An optional Redis cache.
- Config
- Fully-resolved server configuration.
- Database
Config - Docs
Config - Interactive API documentation (OpenAPI spec + Swagger UI).
- Email
Config - Outbound email: which provider sends it, and the credentials to do so.
- Public
Config - Static files served from the app’s
public/directory. - Server
Config - Smtp
Config - SMTP transport settings, used only when
provider = "smtp".