You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently routing takes a naive express way approach.
First registered first served. Because we are registering by file listing our routing is defined by that order.
So we have no way to control / know which of the following routes will be executed:
/*
/api
or:
/api/todo/:id
/api/todo/list
i see two ways:
adding a 'priority' number and sort by that
or:
make express routing testable
define a subset of valid path features (path params, wildcards at the end)
maybe test for unreachable routes
write a simple algorithm which determines the most specific route for conflicts and controls the order of the registration
The text was updated successfully, but these errors were encountered:
Currently routing takes a naive express way approach.
First registered first served. Because we are registering by file listing our routing is defined by that order.
So we have no way to control / know which of the following routes will be executed:
/*
/api
or:
/api/todo/:id
/api/todo/list
i see two ways:
or:
The text was updated successfully, but these errors were encountered: