|
123456789101112131415161718192021222324252627282930313233343536373839 |
- # Shared by the Axum server and the Vite reverse-proxy plugin.
- # Precedence: default.toml → {APP_ENV}.toml → APP__SECTION__KEY env vars.
-
- [app]
- name = "rust-template"
- description = "Axum + Vue + PostgreSQL fullstack app"
-
- [server]
- host = "127.0.0.1"
- port = 8080
- # Public origin the API advertises in OpenAPI (and that Vite proxies to).
- public_url = "http://127.0.0.1:8080"
-
- [frontend]
- host = "127.0.0.1"
- port = 5173
- # Vite binds here so /api is never resolved to IPv6 ::1.
- public_url = "http://127.0.0.1:5173"
-
- [database]
- url = "postgres://app:app@127.0.0.1:5432/app"
- max_connections = 10
- min_connections = 1
- acquire_timeout_secs = 5
- idle_timeout_secs = 600
- run_migrations = true
-
- [logging]
- # trace | debug | info | warn | error
- level = "info"
- # pretty | json
- format = "pretty"
- # Extra directive, e.g. "sqlx=warn,tower_http=debug"
- filter = "server=debug,tower_http=info,sqlx=warn"
-
- [cors]
- # Development allows the Vite origin. Production should list real origins.
- allowed_origins = ["http://127.0.0.1:5173"]
- allow_credentials = true
|