import format

This commit is contained in:
2026-08-01 08:53:34 +08:00
parent 5066e453e2
commit 30e441dfc9
2 changed files with 11 additions and 15 deletions
+2 -4
View File
@@ -1,10 +1,8 @@
use std::env;
use axum::{http::StatusCode, routing::get, Router};
use axum::{Router, http::StatusCode, routing::get};
#[tokio::main]
async fn main() -> std::io::Result<()> {
let bind_addr = env::var("BIND_ADDR").unwrap_or_else(|_| "127.0.0.1:3000".to_string());
let bind_addr = std::env::var("BIND_ADDR").unwrap_or_else(|_| "127.0.0.1:3000".to_string());
let listener = tokio::net::TcpListener::bind(&bind_addr).await?;
let app = Router::new()
.route("/", get("ok"))