diff --git a/src/api.rs b/src/api.rs index 7e6538b..f632b54 100644 --- a/src/api.rs +++ b/src/api.rs @@ -9,7 +9,6 @@ use axum::{ }; use serde::{Deserialize, Serialize}; use std::sync::Arc; -use tokio::net::TcpListener; use tracing::{info, error, debug, instrument}; use crate::document_service::{Document, DocumentService, SignatureVerification}; @@ -106,12 +105,8 @@ pub async fn start_api( info!("API routes configured"); - // Start server - let listener = TcpListener::bind(format!("0.0.0.0:{}", api_port)).await?; - info!("API server started on port {}", api_port); - // Get the socket address - let addr = listener.local_addr()?; + let addr = std::net::SocketAddr::from(([0, 0, 0, 0], api_port)); // Bind and serve info!("Serving API at {}", addr);