From 34152dabc3bb20f6a14d0d6d08510294d5b3681b Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Mon, 8 Dec 2025 14:08:56 -0300 Subject: [PATCH] fix: change default botserver port from 8081 to 8080 Match botserver's default port configuration for proper health check connectivity between botui and botserver. --- src/http_client.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/http_client.rs b/src/http_client.rs index e256a8b..6ae593d 100644 --- a/src/http_client.rs +++ b/src/http_client.rs @@ -19,7 +19,7 @@ impl BotServerClient { /// Create new botserver HTTP client pub fn new(base_url: Option) -> Self { let url = base_url.unwrap_or_else(|| { - std::env::var("BOTSERVER_URL").unwrap_or_else(|_| "http://localhost:8081".to_string()) + std::env::var("BOTSERVER_URL").unwrap_or_else(|_| "http://localhost:8080".to_string()) }); let client = reqwest::Client::builder() @@ -37,7 +37,7 @@ impl BotServerClient { /// Create with custom timeout pub fn with_timeout(base_url: Option, timeout: Duration) -> Self { let url = base_url.unwrap_or_else(|| { - std::env::var("BOTSERVER_URL").unwrap_or_else(|_| "http://localhost:8081".to_string()) + std::env::var("BOTSERVER_URL").unwrap_or_else(|_| "http://localhost:8080".to_string()) }); let client = reqwest::Client::builder() @@ -216,13 +216,15 @@ mod tests { fn test_client_default_url() { std::env::remove_var("BOTSERVER_URL"); let client = BotServerClient::new(None); - assert_eq!(client.base_url(), "http://localhost:8081"); + assert_eq!(client.base_url(), "http://localhost:8080"); } #[test] fn test_client_with_timeout() { - let client = - BotServerClient::with_timeout(Some("http://test:9000".to_string()), Duration::from_secs(60)); + let client = BotServerClient::with_timeout( + Some("http://test:9000".to_string()), + Duration::from_secs(60), + ); assert_eq!(client.base_url(), "http://test:9000"); }