pub async fn run(
config_toml: String,
secrets: HashMap<String, String>,
build_info: BuildInfo,
addr: SocketAddr,
use_tls: bool,
) -> Result<()>Expand description
Run the API server.
Creates a Session with the given config, starts a background task to
drain workflow messages and broadcast them to WebSocket clients, then
serves the REST + WebSocket + static files on addr.
If [oidc] or [dev] sections are found in the config TOML, auth is
enabled — all /api/v1/* endpoints (except health) require a valid token.
By default serves over HTTPS using a self-signed certificate from
~/.trustee/certs/. If use_tls is false, serves plain HTTP.