From 645172747a8d125c789b447f602e11565ff51d21 Mon Sep 17 00:00:00 2001 From: filipriec Date: Sun, 8 Jun 2025 21:53:48 +0200 Subject: [PATCH] we are now running search server at the same port as the whole backend service --- server/src/server/run.rs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/server/src/server/run.rs b/server/src/server/run.rs index 7e42e1b..40d6e11 100644 --- a/server/src/server/run.rs +++ b/server/src/server/run.rs @@ -21,24 +21,14 @@ use common::proto::multieko2::{ table_script::table_script_server::TableScriptServer, auth::auth_service_server::AuthServiceServer }; -use search::run_search_service; +use search::{SearcherService, SearcherServer}; pub async fn run_server(db_pool: sqlx::PgPool) -> Result<(), Box> { // Initialize JWT for authentication crate::auth::logic::jwt::init_jwt()?; - // ==================== SEARCH SERVER SETUP ================== - let search_addr = "[::1]:50052".to_string(); - println!("Spawning Search Service on {}", search_addr); - - tokio::spawn(async move { - if let Err(e) = run_search_service(&search_addr).await { - eprintln!("[Error] Search service failed to start: {}", e); - } - }); - // ============================================================ - let addr = "[::1]:50051".parse()?; + println!("Unified Server listening on {}", addr); let reflection_service = ReflectionBuilder::configure() .register_encoded_file_descriptor_set(FILE_DESCRIPTOR_SET) @@ -49,6 +39,7 @@ pub async fn run_server(db_pool: sqlx::PgPool) -> Result<(), Box Result<(), Box