router
router copied to clipboard
Simple middleware-style router
This is a tracking issue for release 2.0. **_Try the latest beta with `npm install [email protected]`_** **Please keep feature requests in their own issues** If you want to make a...
This is a proof-of-concept implementation of the [diagnostics_channel](https://github.com/nodejs/node/pull/34895) feature I'm working on in Node.js core. The value here is for APM products to be able to capture changes to routing...
See #49 for previous discussion. I made a few other notable changes: - The events are now given both the request and response. I thought this would be useful if...
The following events were added: 1. `handlestart` - emitted when the router starts to handle the router stack. 2. `layer` - emitted when a layer is matched by the router....
There have been a couple of requests in the Express project for supporting named routes, https://github.com/expressjs/express/issues/2746 and https://github.com/expressjs/express/issues/2739. This PR enables a name to be used when a route is...
An example of a usage for this reflection property would be in layer code: ``` javascript function isLayerStillWaiting(next, layer) { return next._currentLayer === layer } ``` This would be useful...
- Rebased #76, - Brought typescript up to date, - Added all HTTP methods, as requested in the original PR, - Removed usages of `any` where possible, - Fixed some...
This method allows to clear routes stack. As discussed here: https://github.com/expressjs/express/issues/4296
According to the issue number [2414](https://github.com/expressjs/express/issues/2414) in express which indicates sending 405 status code in case of not allowed http method for existing resource and this issue is found in...
This PR attempts to implement https://github.com/expressjs/express/issues/2883. --- When using an error handler you have access to `req.route` which describes the most recently matched route. However, some other informaiton (like `req.baseUrl`)...