-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Express compatibility #1503
Copy link
Copy link
Closed
Labels
discussionIssues or PRs with this label will never staleIssues or PRs with this label will never stalesemver-majorIssue or PR that should land as semver majorIssue or PR that should land as semver majorv3.xIssue or pr related to Fastify v3Issue or pr related to Fastify v3
Milestone
Metadata
Metadata
Assignees
Labels
discussionIssues or PRs with this label will never staleIssues or PRs with this label will never stalesemver-majorIssue or PR that should land as semver majorIssue or PR that should land as semver majorv3.xIssue or pr related to Fastify v3Issue or pr related to Fastify v3
🚀 Feature Proposal
From the next version of Fastify, I would love to decouple even more Express middlewares from the core framework.
The current solution is to integrate Middie with Fastify and expose it via the
useAPI.I think we should design a new plugin that offers this functionality (and at the same time remove the
useAPI from core); technically is possible since Fastify offers everything we might need to achieve this goal.Moreover, if we expose this functionality as a plugin, we could even improve the Express support, and apply many other modifications to the request object that we are currently not doing in core to avoid a performance hit.
Finally, we will remove the confusion generated by hooks vs middlewares.
Motivation
Example
What do you think?
What can we put inside this plugin to improve express compatibility?
Any feedback is welcome!