-
-
Notifications
You must be signed in to change notification settings - Fork 635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Express.js Compatible Middleware #3293
Comments
Hi @dipakparmar This is a super exciting proposal, though I don't know if we should do it in our official repo like |
A quick response. I think we can also follow the |
Thanks @yusukebe, https://github.com/senchalabs/connect looks interesting, I'll check it out. |
Maybe with connect and node-mocks-http like this: https://github.com/kravetsone/elysia-connect-middleware/blob/main/src/index.ts |
This is very valuable, I will keep following it. |
Yeah, I think the gap for people who can choose a modern server-side framework now is the compatibility issue with the current middleware's expressjs. Especially with serious business, we always prefer feature-rich sets and battle-tested middleware. Express was good at this with the framework's age + large community. I think the Honojs team can choose some of the most popular middleware of express, like |
Hi team, any progress on this? |
I will challenge this |
Most of the work has been completed. |
I'm exploring the possibility of supporting Express.js compatible middleware in Hono. This would allow for easier migration from Express to Hono and enable the use of the vast ecosystem of Express middleware within Hono applications.
Proposed Implementation
I'm looking for something like this for backward compatibility:
Current Issues
So far, I haven't been able to make this work due to type incompatibility issues. The main challenges are:
Context
object doesn't directly map to Express'sreq
andres
objects.IncomingMessage
andServerResponse
types from Node.js http module don't align perfectly with Hono's request and response handling.Questions
Goals
Any insights, suggestions, or assistance on how to achieve this would be greatly appreciated. Thank you!
The text was updated successfully, but these errors were encountered: