serv4rs 0.1.7

serv4rs is a powerful, pragmatic, and extremely fast web framework for Rust
Documentation
use std::sync::{Arc, RwLock};
use tera::Tera;

#[derive(Debug)]
pub struct TemplateStore {
    pub templates: Arc<RwLock<Tera>>,
}

pub fn load() -> TemplateStore {
    let templates_glob = std::env::var("templdates_folder").expect("TEMPLATES_GLOB not set!");

    let templates = Arc::new(RwLock::new(
        Tera::new(&templates_glob).expect("Unable to compile templates!"),
    ));

    TemplateStore {
        templates: templates,
    }
}