use axum::{ routing::get, extract::Path, Router, }; use tokio::net::TcpListener; pub async fn setup() { let app = Router::new() .route("/xrpc/{nsid}", get(xrpc_get).post(xrpc_post)); let listener = TcpListener::bind("0.0.0.0:6702").await.unwrap(); axum::serve(listener, app).await.unwrap(); } async fn xrpc_get(Path(nsid): Path) -> String { nsid } async fn xrpc_post(Path(nsid): Path) -> String { nsid }