I had always been wondering what kind of notation is the following,
GET /user/:name/books/:title
and how to interpret it until recently, when I learned that they are in the form of Express route and the ones with ":" are Express route parameters.
So here comes the question that I didn't find the answers from, say,
The question is, what if most or even all parameters are optional? How to handle that with Express route?
The problem is, with HTTP query parameters, like
https://example.org/?page=2&limit=3&sort=price
The order of query parameters can be arbitrary, whereas for Express route it seems to me the route parameters has to be specified in a very rigid way/order. So what if all route parameters are optional, and I just need to specify the last one? (no matter how you arrange the route parameters orders, there will always be a last one)
I did learn that Express can deal with querystring.parse(parsedUrl.query), but the reason I'm asking this question is really because of this -- https://github.com/gofiber/docs/blob/master/original/routing.md#parameters
I.e., gofiber follows/uses Express routing convention to handle route parameters, and I need all route parameters to be optional.
How to deal with that?