blob: 6a5f8c8dc237f8ff4a80138176b16b7bbf25b88f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
use actix_web::{HttpResponse, Responder};
use askama::Template;
#[derive(Template)]
#[template(path = "index.htm")]
struct IndexTemplate<'a> {
text: &'a str,
}
pub async fn index() -> impl Responder {
HttpResponse::Ok()
.content_type("text/html")
.body(IndexTemplate { text: "Hello" }.render().unwrap())
}
|