#[cfg(test)] mod tests; pub fn routes() -> Vec { routes![ world, hello, name_age ] } #[get("/world")] fn world() -> &'static str { "Hello, world!" } #[get("/")] fn hello(name: String) -> String { format!("Hello, {}", name) } #[get("/world?&")] fn name_age(name: String, age: u16) -> String { format!("Hello, {} who is {} years old!", name, age) }