client server connection loop

This commit is contained in:
2026-08-06 19:17:03 +08:00
parent 5c5f4dbf01
commit eae86c73f7
13 changed files with 528 additions and 15 deletions
+3
View File
@@ -1,5 +1,7 @@
use axum::{Router, http::StatusCode, routing::get};
mod network;
#[tokio::main]
async fn main() -> std::io::Result<()> {
let bind_addr = std::env::var("BIND_ADDR").unwrap_or_else(|_| "127.0.0.1:3000".to_string());
@@ -7,6 +9,7 @@ async fn main() -> std::io::Result<()> {
let app = Router::new()
.route("/", get("ok"))
.route("/health", get("ok"))
.merge(network::routes())
.fallback((StatusCode::NOT_FOUND, "not found"));
println!("wyd-server listening on http://{bind_addr}");