Skip to main content

Crate trace_weft_server

Crate trace_weft_server 

Source

Modules§

auth
API-key authentication and per-tenant resolution.
storage

Structs§

AppState

Enums§

DbPool

Functions§

build_router
Build the TraceWeft API router over the given application state.
start_dev_server
Start a local-first dev server: the auth bypass defaults on when no keys are configured (see AuthConfig::from_env_local_first), so the local UI works without keys. Used by trace-weft dev.
start_server
Start the server with the production-secure auth default (AuthConfig::from_env): unauthenticated requests are rejected unless TRACE_WEFT_API_KEYS/TRACE_WEFT_DEV_MODE are configured. Runs until the process ends.
start_server_with_shutdown
Start the server with an explicit AuthConfig, stopping gracefully when shutdown resolves. Used by the desktop app to start/stop the embedded server on demand and to drain it cleanly on app exit.