diff --git a/src/routes/web_routes.rs b/src/routes/web_routes.rs index 9522474..19c3e84 100644 --- a/src/routes/web_routes.rs +++ b/src/routes/web_routes.rs @@ -1,9 +1,9 @@ use askama::Template; use axum::{ http::StatusCode, - response::{Html, IntoResponse}, + response::{Html, IntoResponse, Response}, routing::get, - Response, Router, + Router, }; pub fn get_routes() -> Router { @@ -13,6 +13,7 @@ async fn get_index() -> impl IntoResponse { let template = HelloTemplate {}; HtmlTemplate(template) } + #[derive(Template)] #[template(path = "index.html")] struct HelloTemplate; diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..6e7c1e6 --- /dev/null +++ b/templates/index.html @@ -0,0 +1 @@ +

hello