added font

This commit is contained in:
2026-01-16 00:20:32 -05:00
parent 7e5db6b233
commit 4af1325ad6
6 changed files with 237 additions and 31 deletions

View File

@@ -3,17 +3,20 @@ use axum::{
Router,
response::Html,
};
use tower_http::services::ServeDir;
#[tokio::main]
async fn main() {
let site = Router::new().route("/", get(root));
let site = Router::new()
.route("/", get(home))
.nest_service("/static", ServeDir::new("static"));
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
println!("Running on http://127.0.0.1:3000");
axum::serve(listener, site).await.unwrap();
}
async fn root() -> Html<&'static str> {
const HTML: &str = include_str!("../static/root.html");
async fn home() -> Html<&'static str> {
const HTML: &'static str = include_str!("../static/home.html");
Html(HTML)
}
}