How can I accomplish the following KOA route handler:
app.get("/Chicago_Metro/Cicero_City", myFunctionHandler1)
app.get("/Cook_County/Cicero_City", myFunctionHandler2)
and end up with "Chicago" as the parameter to be passed for "metro" OR "Cook" passed for county and "Cicero" passed for "city in my handlers below:
function *myFunctionHandler1(metro, city) {
...
}
function *myFunctionHandler2(county, city) {
...
}
I was considering Regex in the route but I never saw how that can mix with :param.
NOTE: I need to keep that path syntax since it's already SEO'ed and indexed as above.
Worst case probably I will end up with the whole name as parameter and handle it inside a single handlerFn and test the ending to _metro or _county or _city