#[router]
Expand description
wraps your function in a new one that handles http requests and returns responses
§Syntax
the first thing to do is specify the method in all caps without quotes #[router(GET)]
from there specify the path to the resource you want to bind to that is quoted & starts with a leading slash #[router(GET “/my_route”)]
§Examples
#[router(GET "/my_route")]
pub async fn my_route(input: ()) -> Result<(), ()> {
todo!();
Ok(())
}