This commit is contained in:
sparshg
2024-09-13 01:47:01 +05:30
commit 0649cf1cdc
27 changed files with 6587 additions and 0 deletions

11
src/main.rs Normal file
View File

@@ -0,0 +1,11 @@
use axum::{routing::get, Router};
use tokio::net::TcpListener;
#[tokio::main]
async fn main() {
let app = Router::new().route("/", get(|| async { "Hello, Rust!" }));
let listener = TcpListener::bind("127.0.0.1:3000").await.unwrap();
println!("listening on {}", listener.local_addr().unwrap());
axum::serve(listener, app).await.unwrap();
}