79230194

Date: 2024-11-27 12:10:24
Score: 1
Natty:
Report link

You need to adapt your code to something like this:

router.get('*', (req, res) => { ... });

In Express v5, * is used to match all routes, including the ones without a preceding /

As before, make sure the wildcard rout is defined last in the route definitions to avoid it overriding more specific routes.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: dagardev