I moved from Express to Hono

January 14, 2024 Avishka Devinda

In this post, I will share with you my journey of switching from Express to Hono, a new web framework for the Edges. I will explain what Express and Hono are, why I decided to make the change, how I did it, and what I learned along the way. I hope you will find this post useful and inspiring, especially if you are considering moving to Hono or another Edge

What is Express JS?

Express is a popular web framework for Node.js that provides a robust set of features for web and mobile applications. It is fast, unopinionated, and minimalist, but also has a large ecosystem of middleware and templates. I used Express for a long time and enjoyed its simplicity and flexibility.

What is Hono JS?

Hono is a new web framework for the Edges, which means it works on any JavaScript runtime, such as Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Lagon, AWS Lambda, and Node.js. It is ultrafast, lightweight, and web-standards compliant. It has a built-in router, middleware, and helpers, and uses only the Web Standard API.

Why I moved to Hono JS

I decided to move to Hono for several reasons. First, I wanted to take advantage of the performance and scalability benefits of running my web applications on the Edges, which are closer to the users and can handle more requests with less latency. Second, I liked the idea of having a multi-runtime framework that can run on different platforms without changing the code. Third, I was impressed by the speed and size of Hono, which is faster than Express and other routers, and has a tiny footprint of less than 14KB.

How I moved from Express to Hono

Moving from Express to Hono was not difficult, as both frameworks have similar concepts and APIs. I only had to make some minor adjustments to the syntax and the middleware. Hono also has a great documentation and a friendly community that helped me with the transition.

My experience with Hono so far

I am very happy with my decision to move to Hono, and I recommend it to anyone who is looking for a fast, lightweight, and multi-runtime web framework for the Edges. Hono is not only fast, but also fun to use.