First hello world.

This commit is contained in:
2026-06-12 15:31:01 +01:00
commit 02992f56ec
2 changed files with 29 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
[package]
name = "fares_site"
version = "0.1.0"
edition = "2024"
[dependencies]
axum = "0.8.9"
tokio = { version = "1.52.3", features = ["rt-multi-thread"] }
html = "0.6.3"
+20
View File
@@ -0,0 +1,20 @@
use axum::{Router, routing::get};
#[tokio::main]
async fn main() {
let app = Router::new()
.route(
"/",
get(|| async { "Incorrect reverse-proxy, '/' should be handled elsewhere." }),
)
.route("/fares", get(app));
let listener = tokio::net::TcpListener::bind("0.0.0.0:8000").await.unwrap();
axum::serve(listener, app).await.unwrap();
}
async fn app() -> String {
let tree = html::text_content::Division::builder()
.text("Hello Fares!")
.build();
tree.to_string()
}