Multiple file routing setup

This commit is contained in:
2025-08-18 08:16:50 +02:00
parent 82a7a5acb5
commit 3db51cc805
7 changed files with 782 additions and 0 deletions

26
src/main.rs Normal file
View File

@@ -0,0 +1,26 @@
use axum::{
//response::Html,
routing::get, //post,
Router
};
mod routes;
#[tokio::main]
async fn main() {
let app : Router = routes::create_routes();
let listener = tokio::net::TcpListener::bind("127.0.0.1:3000")
.await
.unwrap();
println!("listining on {}", listener.local_addr().unwrap() );
axum::serve(listener, app).await.unwrap();
}
async fn handler() -> &'static str {
"Hiii from localhost"
}