Add support for express/connect middlewares #1520
Replies: 2 comments 4 replies
-
The Express/connect middleware is based on Node.js incoming/outgoing messages. To be able to use them, the Node.js Adapter is required. Therefore, it is difficult to use many of them in an edge environment. Also, Hono will be slow with the Node.js Adapter, so it is impossible to introduce them while maintaining performance. |
Beta Was this translation helpful? Give feedback.
-
@yusukebe the idea was to use it in conjunction with the Node.js Adapter as well, as it only simplifies when migration from an Express project to Hono. That's why this would be a 3rd-party middleware, meaning the Node.js Adapter would be mandatory/required. Again, this is my current use case to avoid rewriting an Hono version of each one to migrate a dozen APIs, instead, it could bring some simplicity like middie does for Fastify. |
Beta Was this translation helpful? Give feedback.
-
Hello there 👋
I'd like to ask about the possibility of creating a way to use express/connect syntax-style middleware with a plug-and-play solution.
Fastify does it using middie and it just works without sacrificing performance.
I'm migrating one API at a time starting the internal ones that don't require too much stuff/middleware.
Why:
I'm migrating a few Express apps that have some custom middleware in between and using Express/Connect signatures.
Some example:
Hopefully, this won't be something useful just for me, as multer and helmet would be an amazing addition to it.
Beta Was this translation helpful? Give feedback.
All reactions