Releases: BackendStack21/restana
Releases · BackendStack21/restana
Fixes method chaining
Fixes method chaining for .use
and routes registration shortcuts like .get, .post, ...
app
.use(...)
.use(...)
.get(...)
.start(3000)
v4
Added
- Node.js v10.x+ is required.
0http
sequential router is now the default and only HTTP router.- Overall middlewares support was improved.
- Nested routers are now supported.
- Improved error handler through async middlewares.
- New
getRouter
andnewRouter
methods are added for accesing default and nested routers.
Removed
- The
response
event was removed. find-my-way
router is replaced by0http
sequential router.- Returning result inside async handler is not allowed anymore. Use
res.send...
Fix APM documentation example code
Fixes Elastic APM usage documentation
Minor typescript definitions fix
Fixes addRoute
method typings definition.
Elastic APM - route naming
Elastic APM (#60) * Exposing errorHandler and addRoute methods * Adding Elastic APM integration * v3.3.4
Update find-my-way
"dependencies": {
"find-my-way": "^2.2.1"
}
Updating "find-my-way": "^2.1.1"
Update deps (#57) * updating dependencies * supporting new hapi version * v3.3.2 -> "find-my-way": "^2.1.1"
Improve memory management
Removing unrequired refs from memory during routes registration.
Async Middlewares support + Perf improvements
Thanks to @Akkuma contribution in #49, we are now supporting async middlewares, so developers can control modern execution flows as described below:
service.use(async(req, res, next) => {
await next()
console.log('Next middlewares were executed!')
})
service.use(...)
Also capturing exceptions inside async middlewares becomes easier:
service.use(async(req, res, next) => {
try {
await next()
} catch(err) {
res.send(err)
}
})
On top of this, restana becomes also 1 - 4 % faster while dealing with middlewares. 🚀🚀🚀
Updating linting and docs
- Minor linting fixes.
- Adding "serving static files with restana" to docs and demos