this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix server persistence - now runs indefinitely serving requests

- Added ApiServer startup to main.rs to actually start HTTP/gRPC servers
- Updated default ports to match documentation (REST: 3000, gRPC: 50051)
- Added proper server startup logging with service URLs
- Server now persists and serves requests instead of exiting immediately
- Cleaned up unused imports in main.rs to reduce warnings

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

+20 -9
+18 -7
src/main.rs
··· 1 - use gigabrain::{Graph, NodeId, RelationshipId}; 1 + use gigabrain::Graph; 2 2 use gigabrain::cypher::parse_cypher; 3 3 use gigabrain::storage::MemoryStore; 4 - use std::collections::HashMap; 5 - use std::sync::Arc; 4 + use gigabrain::server::{ApiServer, ServerConfig}; 6 5 use tracing::{info, warn}; 7 6 use tracing_subscriber; 8 7 ··· 18 17 19 18 { 20 19 let mut schema = graph.schema().write(); 21 - let person_label = schema.get_or_create_label("Person"); 22 - let name_prop = schema.get_or_create_property_key("name"); 23 - let age_prop = schema.get_or_create_property_key("age"); 20 + let _person_label = schema.get_or_create_label("Person"); 21 + let _name_prop = schema.get_or_create_property_key("name"); 22 + let _age_prop = schema.get_or_create_property_key("age"); 24 23 let knows_rel = schema.get_or_create_relationship_type("KNOWS"); 25 24 drop(schema); 26 25 ··· 60 59 } 61 60 } 62 61 63 - let storage = MemoryStore::new(); 62 + let _storage = MemoryStore::new(); 64 63 info!("Initialized persistent storage"); 65 64 66 65 info!("GigaBrain Graph Database started successfully!"); 66 + 67 + // Start the API server 68 + let config = ServerConfig::default(); 69 + let server = ApiServer::new(graph, config); 70 + 71 + info!("Starting API servers..."); 72 + info!("REST API will be available at: http://localhost:3000"); 73 + info!("gRPC API will be available at: http://localhost:50051"); 74 + info!("API documentation: http://localhost:3000/api/v1/docs"); 75 + 76 + // This will run indefinitely serving requests 77 + server.start().await?; 67 78 68 79 Ok(()) 69 80 }
+2 -2
src/server/mod.rs
··· 29 29 impl Default for ServerConfig { 30 30 fn default() -> Self { 31 31 Self { 32 - grpc_port: 9090, 33 - rest_port: 8080, 32 + grpc_port: 50051, 33 + rest_port: 3000, 34 34 auth_enabled: false, 35 35 jwt_secret: "default-secret-change-in-production".to_string(), 36 36 cors_origins: vec!["*".to_string()],