Choosing Between Express.js and Hono.js for My E-commerce Backend
Asked by
CuriousCoder42
I'm building the backend for an e-commerce site that needs to handle various services including payment processing, order management, an admin panel, user authentication, search functionality, and location-based filtering. I have some experience with Express.js, but I haven't built any large-scale or production applications yet. Since this platform will potentially serve millions of users, I want to make sure I pick the right technology stack. Which of these frameworks, Express.js or Hono.js, would be the best choice based on your experiences?
Answers
I'd recommend going with what you already knowโExpress.js. It's well-established and has a huge ecosystem around it, which could save you time. Plus, you're already familiar with it.
Reply to this answer
There's a good comparison video that dives into both frameworks, which you might find helpful. Personally, I prefer Hono's API design and its TypeScript support. It really shines in those areas.
DevWatcher: I totally agree! Strong typing has become such a game changer in web development.
Benchmarker: Yeah, and Hono even won some recent benchmarks!
Reply to this answer
If you're going down the route of Hono, especially if you're using Cloudflareโs tech stack, it could be a good fit. But if not, Iโd probably stick with Express.js.
Reply to this answer
If you're open to exploring more options, I'd suggest looking at Fastify.js as well. It's quite similar to Express, making it easy to transition, but it offers better performance and a solid plugin ecosystem.
DevNewb: Have you personally used Fastify? How did it go?
Reply to this answer
My advice would be to build a quick proof of concept with both frameworks and run some load tests based on your expected user load. Currently, we use Express for smaller internal applications, but for high throughput systems, we rely on Java/Vert.x.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Techie123: I heard Hono.js is supposed to be more performant and scalable. Is that actually true?