1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
use renox::prelude::*; pub struct Home; impl Module for Home { fn name(&self) -> &'static str { "home" } fn routes(&self) -> Routes { Routes::new().get("/", index).name("home") } } async fn index() -> View { view("home/index.html", context! {}) }