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.
OAuthConfig
Signing in with somebody else’s account.
OAuthProviderConfig
One provider’s credentials, and the overrides an unknown provider needs.
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.
ServerConfig
SmtpConfig
SMTP transport settings, used only when provider = "smtp".
StorageConfig
Where uploaded files go.