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
and this seems to work perfectly. happy to put together a 1 line PR, but wondering if any reason to exclude these? in many apps not allowing app.use(path, router), which results in routes misses a big number of them.
The text was updated successfully, but these errors were encountered:
Do you think it would be useful? I mean, I didn't find any way to know which methods it exposes. Also, It would expose nonexistent endpoints, for example, if you are using a middleware attached to a route like this:
app.use('/api',jsonBodyParser)
That would be exposed as an endpoint although it's only a middleware and is not going to provide a response.
Created PR #90 by adding includeMiddlewareRoutes as an optional configuration.
The potentially valid use-cases:
The handler might be registered via .use() because internally it has logic which handles multiple requests / request methods
The handler might be registered via .use() because it doesn't care about the request method (A collaborative project where the team members may not be following a strict standard)
The generated list is going to be utilized by developers for an overview of the project's architecture and it is helpful for its debugging nature
express-list-endpoints/src/index.js
Line 8 in 0b14cc3
locally i have
and this seems to work perfectly. happy to put together a 1 line PR, but wondering if any reason to exclude these? in many apps not allowing app.use(path, router), which results in routes misses a big number of them.
The text was updated successfully, but these errors were encountered: