router.cr icon indicating copy to clipboard operation
router.cr copied to clipboard

Add constraint to route

Open waghanza opened this issue 5 years ago • 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

waghanza avatar Jul 08 '19 12:07 waghanza

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

tbrand avatar Jul 08 '19 12:07 tbrand