As of the 0.2.x branch, Travetto has moved all RESTful packages towards a framework-agnostic structure. The primary driver behind this, is to allow for alternatives to express.js to be used in applications. Currently, koa and fastify have been added to the list of supported backends.
Additionally, all packages that previously built upon the express module, now will build upon the rest module. This means that Asset-Express, Auth-Express, and Express modules have been deprecated, and replaced with Asset-Rest, Auth-Rest, and Rest respectively. The Rest module also provides an API for Request and Response objects that allows for building backend agnostic middleware. The APIs are modeled after express, allowing for usage of the most common middleware packages (e.g. passport).
This means that the Rest framework allows for koa and fastify to both use passport via the Request/Response API. Also, the Swagger integration occurs at the Rest level, and so all documentation patterns still apply.
Enjoy,
- The Travetto Team
No comments:
Post a Comment