The "Runtime Wall" is Gone π§±π¨
When I first built BEnder (my framework-agnostic boilerplate), I made a simple assumption:
- If you're on Node.js, you use Express, Fastify, or Koa.
- If you're on Bun, you use Hono or Elysia.
I was wrong.
The ecosystem has evolved. Bun has excellent Node compatibility (running Express/Fastify effortlessly), and Hono has become a web-standard powerhouse that runs everywhere, including Node.js.
The Update: True Agnosticism
Today's update to BEnder tears down the arbitrary wall between runtimes. We now prioritize the installed framework over the underlying runtime.
What does this mean?
It means you can mix and match your stack however you prefer:
| Framework | Node.js π’ | Bun π₯― |
|---|---|---|
| Express | β | β |
| Fastify | β | β |
| Koa | β | β |
| Hono | β | β |
| Elysia | β | β |
π₯― Running Hono on Node.js
Hono is incredible, but it uses Web Standard APIs (Fetch) which Node historically lacked. To make this work, we use the @hono/node-server adapter.
BEnder detects if you are running hono inside a Node environment and automatically wraps the server:
// Auto-detected logic inside BEnder
if (isNode) {
const { serve } = await import('@hono/node-server');
serve({ fetch: app.fetch, port });
} else {
Bun.serve({ fetch: app.fetch, port });
}
This happens transparently. You just install hono and @hono/node-server, run npm start, and it works.
π’ Running Express/Fastify on Bun
This was the easier partβBun's Node compatibility layer is so good that we didn't have to change much! If you love the stability of Express but want the startup speed of Bun, just bun add express and go.
What about Elysia?
Elysia remains the one exception. It is heavily optimized for Bun's internal APIs and performance characteristics. While there is experimental support for Node, we are keeping it Bun-only in BEnder for now to ensure reliability.
Try it out!
Clone BEnder, pick your favorite runtime, pick your favorite framework, and start building!
Top comments (0)