aboutsummaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorGuillermo Ramos2025-02-16 14:45:55 +0100
committerGuillermo Ramos2025-02-16 19:36:23 +0100
commit7d80d3d2be3e0f8e36be66a08879b1f04a381e88 (patch)
tree39c8958afe98ecc518aa0b51bf2665fe31b4ab5e /src/bin
parent93e1545fb7da1f54fcc3dade596185ffe6c7a17d (diff)
downloadhiccup-7d80d3d2be3e0f8e36be66a08879b1f04a381e88.tar.gz
Basic Elm application
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/web.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/web.rs b/src/bin/web.rs
index fed833b..243e4a2 100644
--- a/src/bin/web.rs
+++ b/src/bin/web.rs
@@ -1,11 +1,13 @@
+
+use std::fs;
use axum::{
response::Html,
routing::get,
Router,
};
-async fn root_get() -> Html<&'static str> {
- Html("<h1>Hello, world!</h1>")
+async fn root_get() -> Html<String> {
+ Html(fs::read_to_string("front/index.html").unwrap())
}
#[tokio::main]