pub async fn serve(cfg: ServeConfig) -> Result<ProxyHandle, ServeError>Expand description
Bind both the reverse-proxy and the API listeners on 127.0.0.1, wire
shared AppState, spawn the server task, and return a ProxyHandle
that the caller can use to discover the bound ports and trigger shutdown.
The configured proxy_port / api_port of 0 ask the kernel to assign a
free port; the actually-bound ports are recorded in both the returned
handle and the persisted store::SessionMeta.