Add service layer to abstract business logic
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
@@ -82,8 +82,11 @@ async fn main() {
|
||||
.await
|
||||
.expect("Failed to connect to Redis");
|
||||
|
||||
// Initialize Service
|
||||
let service = herocoordinator::service::AppService::new(redis);
|
||||
|
||||
// Shared application state
|
||||
let state = Arc::new(herocoordinator::rpc::AppState::new(redis));
|
||||
let state = Arc::new(herocoordinator::rpc::AppState::new(service));
|
||||
|
||||
// Build RPC modules for both servers
|
||||
let http_module = herocoordinator::rpc::build_module(state.clone());
|
||||
|
Reference in New Issue
Block a user