domani/src/service/http/tpl.rs
2023-06-18 15:10:06 +02:00

14 lines
303 B
Rust

use handlebars::Handlebars;
#[derive(rust_embed::RustEmbed)]
#[folder = "src/service/http/tpl"]
#[prefix = "/"]
struct Dir;
pub fn get() -> Handlebars<'static> {
let mut reg = Handlebars::new();
reg.register_embed_templates::<Dir>()
.expect("registered embedded templates");
reg
}