use axum::Router; use std::net::SocketAddr; mod color; mod polygon; mod routes; #[derive(Clone)] pub struct SharedState {} #[tokio::main] async fn main() { let state = SharedState {}; let app = Router::new() .nest("/", routes::static_files::routes()) .nest("/logo", routes::logo::routes()) .nest("/favicon.ico", routes::favicon::routes()) .with_state(state); // run it let addr = SocketAddr::from(([0, 0, 0, 0], 3000)); println!("listening on {}", addr); axum::Server::bind(&addr) .serve(app.into_make_service()) .await .unwrap(); }