tbrand/router.cr

Add constraint to route

waghanza opened this issue · 1 comments

Hi @tbrand,

It could be useful to add some path constraint to routes, I mean adding a regex (or else to allow / or not some pathes).

For example, adding /user/:id(\\d+), create a route for /user/0, /user/1... but not/user/a`

WDYT ?

PS : This example is taken from kitura

Yeah I agree. 👍
I don't know I could make the time for it. 😢
So anybody please send a PR for this! 🙏 lol