Macro expand

Source
macro_rules! expand {
    ($exprs: expr, $name: expr, $against: path) => { ... };
}
Expand description

Get the value of a path dynamic variable

use mini_server::*;
let mut app = HTTPServer::new("localhost:4221");

app.get("/hello/@name/#age", |_, exprs| {
    let name = expand!(exprs, "name", PathExpr::String);
    let age = expand!(exprs, "age", PathExpr::Number);

    format!("Hello {name}, you are {age}!").into()
});