Make Hono work on Node.js

This ad is not shown to multipass and full ticket holders
JSNation US
JSNation US 2025
November 17 - 20, 2025
New York, US & Online
See JS stars in the US biggest planetarium
Learn More
In partnership with Focus Reactive
Upcoming event
JSNation US 2025
JSNation US 2025
November 17 - 20, 2025. New York, US & Online
Learn more
Bookmark
Rate this content

The creator of Hono talks about Hono. Hono is a web framework using only Web Standard APIs and runs on Cloudflare Workers, Deno, and Bun. Now, in addition to those runtimes, it also runs on Node.js by using a Node.js adapter. However, there were some difficulties along the way. In this session, I will talk about how we adapted Hono to run on Node.js, improved its performance, and the possibility that we will support Connect-compatible middleware.

This talk has been presented at Node Congress 2025, check out the latest edition of this JavaScript Conference.

FAQ

The initial commit for Hono was made on December 15th, 2021.

Hono is a backend web framework for JavaScript that serves as a next-generation alternative to Express. It uses web standard APIs and is designed to work on platforms like Cloudflare, Castino, and Node.js.

Hono is fast, has a small bundle size, works across multiple runtimes, supports easy feature addition through middleware, and offers first-class TypeScript support for a great developer experience.

Performance improvement is crucial for Hono to ensure it can compete with other frameworks on Node.js and provide a fast experience across all supported runtimes.

Hono supports multiple runtimes by using web standard APIs, which allow it to run seamlessly on platforms like Cloudflare, Deno, and BAN, in addition to Node.js.

To improve Node.js performance, Hono introduced lightweight request and response objects, reducing object creation and optimizing performance for simple use cases.

Hono's performance on Node.js has improved significantly, with benchmarks showing it is now faster than Express and approaching the performance of Fastify.

Supporting multiple runtimes allows Hono to reach a larger user base, gain more feedback, and improve its quality by addressing diverse use cases.

Hono was created to provide a robust framework for Cloudflare workers. Existing frameworks either lacked features or did not meet the API preferences of the creator, leading to the development of Hono.

The Node.js adapter in Hono is an npm package that allows Hono applications to run on Node.js by converting Node.js APIs into web standard APIs.

Yusuke Wada
Yusuke Wada
15 min
17 Apr, 2025

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Today's Talk is about making Hono work on Node.js. Hono is a backend for web frameworks that supports TypeScript. It started as a Cloudflare workers framework and now supports multiple runtimes. The Node.js adapter allows Hono applications to run in Node.js by converting Node.js APIs into web standard APIs. Benchmark tests show that Hono is faster than Express but slower in some core areas. The Node.js adapter has been widely used and has undergone performance improvements. Overall, adding Node.js support to Hono has been successful in reaching more users and improving quality.
Available in Español: Make Hono work on Node.js

1. Introduction to Hono

Short description:

I'm very excited to speak at Node Congress today. Today I'd like to talk about how we made Hono work on Node.js. Hono is the backend of web frameworks for JavaScript. It has five key features and supports TypeScript as first class. Let me share how I started building Hono.

Hi. I'm very excited to speak at Node Congress today. The title is Make Hono Work on Node.js. Let's go ahead. My name is Yusuke. I love building web frameworks. I'm working at Cloudflare as a developer advocate. I'm a creator of Hono.

Today I'd like to talk about how we made Hono work on Node.js. Here's today's agenda. First, I talk about Hono. Next, I'll share how Hono started. Then, I'll explain how we made Hono work on Node.js and performance improvements. First, I talk about what is Hono. Hono is the backend of web frameworks for JavaScript. We can call Hono the next generation of express. It uses only web standard APIs and it works on Cloudflare, Castino, and Node.js, et cetera. Here's Hello World web application using Hono. Only one, two, three, four lines, and this API is super simple.

Hono has five key features. First, it's very fast, and second, the bundle size is small and it works across multiple runtime, and you can add many features easily by using middleware. Last, Hono supports TypeScript as first class and providing a great developer experience. I'll talk about the beginning of Hono. Let me share how I started building Hono. We are creating Hono, I wanted to build an application for Cloudflare workers, but at that time, I couldn't find a great framework for me. This IttyRooter is so simple. It doesn't have enough features for me and this worktop and Thunder are good frameworks, but I don't prefer the API that's similar to express. So, I decided to make my own framework. That's how Hono was born. The initial commit of Hono was December 15th, 2021, then Hono was started.

2. Supporting Multiple Runtimes

Short description:

Hono started as a Cloudflare workers framework and now supports multiple runtimes including Dno and BAN. The same code can run on Cloudflare and BAN. Becoming multi-runtime has brought more feedback and improved Hono's quality. Next, we tackle the challenge of making Hono work on Node.js.

It's over three years ago. At that time, Hono was built with WebStandard API and it was only for Cloudflare workers. So, we couldn't really say it's multiple runtime yet. I'll talk about how Hono supports multiple runtimes.

We released version 2 of Hono on June 16th, 2022. Version 2, Hono started to support Dno and BAN. We didn't say Hono supports Dno and BAN before version 2, but it was easy to support them because both Dno and BAN use WebStandard APIs.

To support Dno, we need to do two things. In Dno, to import module, we had to add an extension like .ts or .ds, the module name. And second, Dno imports modules using URLs. So, we made a Hono package that can be downloaded from Dno.runx. Supporting BAN was very easy. After BAN was made public, someone created this issue and is there any plan for BAN.js support? But we don't have to do anything. Hono just works on BAN without any changes.

Here is something interesting. The same code can run on Cloudflare and BAN. This example is just a hello world application and you can learn it. Language dev commands for Cloudflare workers and BAN command for BAN. So, the completely same for hello world application started as Cloudflare workers and BAN. So, we can say Hono is a multi-runtime framework.

Becoming multi-runtime had some great benefits. When Hono started supporting multi-runtime, more people began to use it. This meant we got more feedback, issues and use cases. By addressing this, we improved Hono's quality. So, learning Hono on multi-runtime has led to very good results for us. Next, I explain the Node.js adapter. After supporting DNO and BAN in version 2, our next big challenge was making Hono work on Node.js. Because many people use Node.js, so if it succeeds, Hono would reach much larger users. But Hono application can't run on Node.js as it is. Node.js has web standard APIs like fetch and request response URL and et cetera.

3. Node.js Adapter for Hono

Short description:

The Node.js adapter allows you to run Hono applications in Node.js by converting Node.js APIs into web standard APIs. It provides a simple way to use the adapter with basic Hono applications. Despite some performance overhead, creating the Node.js adapter has been successful, and we have conducted benchmark tests to measure its performance.

But if you build a web server, you need Node.js specified APIs. Here's an example of Hono application for Node.js. As you can see, this object is HTTP incoming message and HTTP server response. This Node.js API, they are different from web standard API. So, you have to use these objects instead of web standard API for Node.js application.

To solve this, we created Node.js adapter. This is published as npm package named at .machono. This converts Node.js API into web standard API. It transforms Node.js HTTP incoming message to web standard request object and it passes it to Hono application. And then Hono application returns the response object and converts it to Node.js HTTP server response. This area is Hono application, Hono Node.js adapter. This adapter you can run your Hono application in Node.js. This is an internal implementation of the adapter. This fallback means Hono application. It receives request object and return response object. The adapter converts Node.js incoming message object to a request object and it passes to Hono's application. Then Hono application returns response object and it sets the status code and header values and body for Node.js server response.

Here's how you use Node.js adapter. This is very basic Hono application and this app is Hono's instance. If you want to run it Node.js, first import a sub method from Hono adapter, Node.js adapter, and pass the application to the sub method. It's so simple and you can execute this code by Node command. Creating Node.js adapter works very well and the download count is increasing. However, there's some performance overhead. It converts between Node.js adapter, Node.js APIs and WebStandard APIs. This overhead introduces performance degradation. So we've done benchmark to measure performance. We'll follow the method described at this URL and there are three scenarios. One is simply receive GET request and return hello world response. Second, it returns a GET request and captures the pass parameter and query parameter and returns these values and add custom header. Last one is passing JSON body from POST request and returns serialized JSON body.

4. Benchmarking Node.js Adapter Performance

Short description:

Here's a Hono application that handles three scenarios and the benchmark results compared to Node.js frameworks. Hono is faster than Express but slower on the core. Despite this, our Node.js adapter has been widely used, and we made significant performance improvements by introducing lightweight request and response objects. These optimizations allow Hono to be extremely fast in simple use cases without changing the API.

Here's a Hono application that handles three scenarios. Here's the benchmark results compared to some Node.js frameworks. And BAN and DINO. These BAN and DINO are faster than Node.js application because it doesn't have overheads. But among Node.js frameworks, Hono is faster than Express. But that is slower on the core. And there is a big difference from Fastify. So we cannot say Hono is fast on Node.js.

However, still Node.js has many users, so our Node.js adapter ended up being used by a lot of users. After the Node.js adapter was released, after a while, we made a significant improvement to boost performance. In November 2023, this pull request titled reduce object generation and optimize performance was created. This pull request applies fundamental performance tuning principle. Don't do things until they are necessary. We realized that creating requests and response object using new request and new response are very slow. To solve this, we introduced lightweight request and lightweight response object. Normally, these lightweight objects are used if it doesn't need to read the body. For example, accessing property like request, sorry, status object and status property and method property. But if you want to accessing the body like leak JSON, leak text and leak alibha, then it creates request object.

This means that some simple use case like Hello World application, Hono can extremely fast and one great thing about this optimization is that lightweight request and response object don't change the API. Here's simple code to implement lightweight request in Node.js adapter. This constructor, it doesn't create request object immediately. Instead, it caches this incoming message. When accessing property like method or status, it doesn't create request object either. However, calling JSON or text alibha, which require reading the body, it creates the request object for the first time and read the body from it and it caches request object. Then, it caches object for future. So, next time, it is useful from this cached request object. We learned benchmark again using the same scenarios. There wasn't much difference in JSON body passing benchmark, but we saw large improvement in ping and query test. Each of them about 50% faster than before. Let's compare it with other frameworks.

5. Optimizing Hono for Node.js

Short description:

Previously, Hono has become faster and closer to fastify in performance. The performance of Hono on Node.js is good. Node.js adapter converts web standard APIs to Node.js APIs, improving performance. Hono supports multiple runtimes, reaching more users and improving quality. Adding Node.js support was a good decision. This is the end. Thank you very much.

Previously, Hono was slower in the core, but now it has become faster. And it is always getting, also getting closer to fastify in performance. With this, our performance tuning is complete. The performance of Hono on Node.js is pretty good. Of course, learning on Cloud-Havercast and Deno is faster because there is no conversion overhead. But Node.js is still enough to fast for real-world use case.

So, now, you can use Node.js adapter in production. Now, let's wrap up today's talk. We love new runtime like Cloud-Havercast and Deno and BAN, however, Node.js still has widely used by many developers. So, with the Node.js adapter, it converts web standard APIs to Node.js APIs. By using lightweight request and lightweight response object, we successfully improved performance. One of the best things about Hono is support for multiple runtime. So, this helps Hono reach more users and improve the quality of Hono. Adding Node.js support was definitely a good decision.

So, this was the story of making Hono work on Node.js. This is the end. Thank you very much.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Building Better Websites with Remix
React Summit Remote Edition 2021React Summit Remote Edition 2021
33 min
Building Better Websites with Remix
Top Content
Remix is a web framework built on React Router that focuses on web fundamentals, accessibility, performance, and flexibility. It delivers real HTML and SEO benefits, and allows for automatic updating of meta tags and styles. It provides features like login functionality, session management, and error handling. Remix is a server-rendered framework that can enhance sites with JavaScript but doesn't require it for basic functionality. It aims to create quality HTML-driven documents and is flexible for use with different web technologies and stacks.
Speeding Up Your React App With Less JavaScript
React Summit 2023React Summit 2023
32 min
Speeding Up Your React App With Less JavaScript
Top Content
Watch video: Speeding Up Your React App With Less JavaScript
Mishko, the creator of Angular and AngularJS, discusses the challenges of website performance and JavaScript hydration. He explains the differences between client-side and server-side rendering and introduces Quik as a solution for efficient component hydration. Mishko demonstrates examples of state management and intercommunication using Quik. He highlights the performance benefits of using Quik with React and emphasizes the importance of reducing JavaScript size for better performance. Finally, he mentions the use of QUIC in both MPA and SPA applications for improved startup performance.
Full Stack Documentation
JSNation 2022JSNation 2022
28 min
Full Stack Documentation
Top Content
The Talk discusses the shift to full-stack frameworks and the challenges of full-stack documentation. It highlights the power of interactive tutorials and the importance of user testing in software development. The Talk also introduces learn.svelte.dev, a platform for learning full-stack tools, and discusses the roadmap for SvelteKit and its documentation.
SolidJS: Why All the Suspense?
JSNation 2023JSNation 2023
28 min
SolidJS: Why All the Suspense?
Top Content
Suspense is a mechanism for orchestrating asynchronous state changes in JavaScript frameworks. It ensures async consistency in UIs and helps avoid trust erosion and inconsistencies. Suspense boundaries are used to hoist data fetching and create consistency zones based on the user interface. They can handle loading states of multiple resources and control state loading in applications. Suspense can be used for transitions, providing a smoother user experience and allowing prioritization of important content.
From GraphQL Zero to GraphQL Hero with RedwoodJS
GraphQL Galaxy 2021GraphQL Galaxy 2021
32 min
From GraphQL Zero to GraphQL Hero with RedwoodJS
Top Content
Tom Pressenwurter introduces Redwood.js, a full stack app framework for building GraphQL APIs easily and maintainably. He demonstrates a Redwood.js application with a React-based front end and a Node.js API. Redwood.js offers a simplified folder structure and schema for organizing the application. It provides easy data manipulation and CRUD operations through GraphQL functions. Redwood.js allows for easy implementation of new queries and directives, including authentication and limiting access to data. It is a stable and production-ready framework that integrates well with other front-end technologies.
It's a Jungle Out There: What's Really Going on Inside Your Node_Modules Folder
Node Congress 2022Node Congress 2022
26 min
It's a Jungle Out There: What's Really Going on Inside Your Node_Modules Folder
Top Content
The talk discusses the importance of supply chain security in the open source ecosystem, highlighting the risks of relying on open source code without proper code review. It explores the trend of supply chain attacks and the need for a new approach to detect and block malicious dependencies. The talk also introduces Socket, a tool that assesses the security of packages and provides automation and analysis to protect against malware and supply chain attacks. It emphasizes the need to prioritize security in software development and offers insights into potential solutions such as realms and Deno's command line flags.

Workshops on related topic

Node.js Masterclass
Node Congress 2023Node Congress 2023
109 min
Node.js Masterclass
Top Content
Workshop
Matteo Collina
Matteo Collina
Have you ever struggled with designing and structuring your Node.js applications? Building applications that are well organised, testable and extendable is not always easy. It can often turn out to be a lot more complicated than you expect it to be. In this live event Matteo will show you how he builds Node.js applications from scratch. You’ll learn how he approaches application design, and the philosophies that he applies to create modular, maintainable and effective applications.

Level: intermediate
Build and Deploy a Backend With Fastify & Platformatic
JSNation 2023JSNation 2023
104 min
Build and Deploy a Backend With Fastify & Platformatic
Top Content
WorkshopFree
Matteo Collina
Matteo Collina
Platformatic allows you to rapidly develop GraphQL and REST APIs with minimal effort. The best part is that it also allows you to unleash the full potential of Node.js and Fastify whenever you need to. You can fully customise a Platformatic application by writing your own additional features and plugins. In the workshop, we’ll cover both our Open Source modules and our Cloud offering:- Platformatic OSS (open-source software) — Tools and libraries for rapidly building robust applications with Node.js (https://oss.platformatic.dev/).- Platformatic Cloud (currently in beta) — Our hosting platform that includes features such as preview apps, built-in metrics and integration with your Git flow (https://platformatic.dev/). 
In this workshop you'll learn how to develop APIs with Fastify and deploy them to the Platformatic Cloud.
Building a Hyper Fast Web Server with Deno
JSNation Live 2021JSNation Live 2021
156 min
Building a Hyper Fast Web Server with Deno
Workshop
Matt Landers
Will Johnston
2 authors
Deno 1.9 introduced a new web server API that takes advantage of Hyper, a fast and correct HTTP implementation for Rust. Using this API instead of the std/http implementation increases performance and provides support for HTTP2. In this workshop, learn how to create a web server utilizing Hyper under the hood and boost the performance for your web apps.
0 to Auth in an Hour Using NodeJS SDK
Node Congress 2023Node Congress 2023
63 min
0 to Auth in an Hour Using NodeJS SDK
WorkshopFree
Asaf Shen
Asaf Shen
Passwordless authentication may seem complex, but it is simple to add it to any app using the right tool.
We will enhance a full-stack JS application (Node.JS backend + React frontend) to authenticate users with OAuth (social login) and One Time Passwords (email), including:- User authentication - Managing user interactions, returning session / refresh JWTs- Session management and validation - Storing the session for subsequent client requests, validating / refreshing sessions
At the end of the workshop, we will also touch on another approach to code authentication using frontend Descope Flows (drag-and-drop workflows), while keeping only session validation in the backend. With this, we will also show how easy it is to enable biometrics and other passwordless authentication methods.
Table of contents- A quick intro to core authentication concepts- Coding- Why passwordless matters
Prerequisites- IDE for your choice- Node 18 or higher
Building WebApps That Light Up the Internet with QwikCity
JSNation 2023JSNation 2023
170 min
Building WebApps That Light Up the Internet with QwikCity
WorkshopFree
Miško Hevery
Miško Hevery
Building instant-on web applications at scale have been elusive. Real-world sites need tracking, analytics, and complex user interfaces and interactions. We always start with the best intentions but end up with a less-than-ideal site.
QwikCity is a new meta-framework that allows you to build large-scale applications with constant startup-up performance. We will look at how to build a QwikCity application and what makes it unique. The workshop will show you how to set up a QwikCitp project. How routing works with layout. The demo application will fetch data and present it to the user in an editable form. And finally, how one can use authentication. All of the basic parts for any large-scale applications.
Along the way, we will also look at what makes Qwik unique, and how resumability enables constant startup performance no matter the application complexity.
GraphQL - From Zero to Hero in 3 hours
React Summit 2022React Summit 2022
164 min
GraphQL - From Zero to Hero in 3 hours
Workshop
Pawel Sawicki
Pawel Sawicki
How to build a fullstack GraphQL application (Postgres + NestJs + React) in the shortest time possible.
All beginnings are hard. Even harder than choosing the technology is often developing a suitable architecture. Especially when it comes to GraphQL.
In this workshop, you will get a variety of best practices that you would normally have to work through over a number of projects - all in just three hours.
If you've always wanted to participate in a hackathon to get something up and running in the shortest amount of time - then take an active part in this workshop, and participate in the thought processes of the trainer.