use actix_web::{get, HttpResponse, Responder}; use askama::Template; #[get("/")] pub async fn page() -> impl Responder { HttpResponse::Ok().body(get_index()) } #[derive(Template)] #[template(path = "../templates/index.html")] struct IndexTemplate {} pub fn get_index() -> std::string::String { let index = IndexTemplate {}; index.render().unwrap() }