feat: add axium hello world

This commit is contained in:
Alexander Navarro 2025-02-13 12:11:27 -03:00
parent ca2ea91976
commit 0923ac1841
3 changed files with 617 additions and 2 deletions

View file

@ -1,3 +1,10 @@
fn main() {
println!("Hello, world!");
use axum::routing::get;
use axum::Router;
#[tokio::main]
async fn main() {
let app = Router::new().route("/", get(|| async { "Hello, World!" }));
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
axum::serve(listener, app).await.unwrap();
}