routes

Macro routes 

Source
routes!() { /* proc-macro */ }
Expand description

Macro for generated rapid route handlers based on the file system

This macro will look through the specified path and codegen route handlers for each one Currently, there is only logic inplace to support GET, POST, DELETE, and PUT requests as well as middleware via a “_middleware.rs” file

  • item - A string slice that holds the path to the file system routes root directory (ex: “src/routes”)

§Examples

routes!("src/routes")