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