newtang / expresso

A faster, safer, backwards compatible router alternative for Express.
MIT License
5 stars 0 forks source link

Support optional param operator (?) in parameterized routes #20

Open newtang opened 3 years ago

newtang commented 3 years ago

We don't support the optional param operator (?) in parameterized routes. This should be possible.

Example

GET: /api/:id/:isdraft?

newtang commented 3 years ago

In cases like /api/:isdraft? one of the results would be just /api. Ideally, this would be added to a static route.