This commit is contained in:
geoffsee
2025-05-23 09:48:26 -04:00
commit 66d3c06230
84 changed files with 6529 additions and 0 deletions

43
src/main.rs Normal file
View File

@@ -0,0 +1,43 @@
// src/main.rs
use crate::config::AppConfig;
use crate::routes::create_router;
use crate::setup::init_logging;
mod config;
mod routes;
mod setup;
mod handlers;
mod agents;
mod genaiscript;
mod utils;
mod session_identify;
#[tokio::main]
async fn main() {
// Initialize logging
init_logging();
// Load configuration
let config = AppConfig::new();
// Create router with all routes
let app = create_router();
// Start core
let addr = "0.0.0.0:3006";
tracing::info!("Attempting to bind core to {}", addr);
let listener = match tokio::net::TcpListener::bind(addr).await {
Ok(l) => {
tracing::info!("Successfully bound to {}", l.local_addr().unwrap());
l
}
Err(e) => {
tracing::error!("Failed to bind to {}: {}", addr, e);
panic!("Server failed to start");
}
};
tracing::info!("Server starting on {}", listener.local_addr().unwrap());
axum::serve(listener, app.into_make_service()).await.unwrap();
}