import format
This commit is contained in:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user