- Built with Tokio and Hyper for async I/O
- Tower middleware integration
- Type-safe and modular routing
- High performance with minimal boilerplate
use axum::{handler::get, Router};
async fn hello() -> &'static str {
"Hello, Axum!"
}
#[tokio::main]
async fn main() {
let app = Router::new().route("/", get(hello));
axum::Server::bind(&"127.0.0.1:3000".parse().unwrap())
.serve(app.into_make_service())
.await
.unwrap();
}