Seeking help with routing in Express. I am trying to have both /m/objectID
and /m/someslug/ObjectID
directed to the same function. My current setup is as follows:
app.get("/m/:id", ...);
app.get("/m/(.*)/:id", ...);
The first route is working properly, but the second one is not. I suspect that my regex may be incorrect. Can anyone point out where I might be making a mistake?