From 265281f7e0036d98946da2446aede400ac331a71 Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 12 Mar 2026 22:24:19 +0000 Subject: [PATCH 01/10] feat: add `express` to replacements --- docs/modules/README.md | 1 + docs/modules/express.md | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 docs/modules/express.md diff --git a/docs/modules/README.md b/docs/modules/README.md index e13396f3..6adcdf2b 100644 --- a/docs/modules/README.md +++ b/docs/modules/README.md @@ -40,6 +40,7 @@ ESLint plugin. - [`eslint-plugin-react`](./eslint-plugin-react.md) - [`eslint-plugin-vitest`](./eslint-plugin-vitest.md) - [`execa`](./execa.md) +- [`express`](./express.md) - [`ezspawn`](./ez-spawn.md) - [`faker`](./faker.md) - [`fast-glob`](./fast-glob.md) diff --git a/docs/modules/express.md b/docs/modules/express.md new file mode 100644 index 00000000..c904fcd4 --- /dev/null +++ b/docs/modules/express.md @@ -0,0 +1,3 @@ +--- +description: Modern alternatives to the express package +--- From 94721b65226b393466b7db34525bba07b870de40 Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 13 Mar 2026 10:39:46 +0000 Subject: [PATCH 02/10] wip --- docs/modules/express.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/modules/express.md b/docs/modules/express.md index c904fcd4..92dfd236 100644 --- a/docs/modules/express.md +++ b/docs/modules/express.md @@ -1,3 +1,15 @@ --- description: Modern alternatives to the express package --- + +# Replacements for `express` + +## `polka` + +## `h3` + +## `tinyhttp` + +## `hono` + +## `elysia` From 8f0bc1040d546f73c9edb3f1fae88f2cdfe26a50 Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 13 Mar 2026 10:44:36 +0000 Subject: [PATCH 03/10] wip --- docs/modules/express.md | 2 -- manifests/preferred.json | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/modules/express.md b/docs/modules/express.md index 92dfd236..114c74a7 100644 --- a/docs/modules/express.md +++ b/docs/modules/express.md @@ -4,8 +4,6 @@ description: Modern alternatives to the express package # Replacements for `express` -## `polka` - ## `h3` ## `tinyhttp` diff --git a/manifests/preferred.json b/manifests/preferred.json index 415139e2..5903e109 100644 --- a/manifests/preferred.json +++ b/manifests/preferred.json @@ -192,6 +192,12 @@ "replacements": ["tinyexec", "nanoexec", "Bun.Shell"], "url": {"type": "e18e", "id": "execa"} }, + "express": { + "type": "module", + "moduleName": "express", + "replacements": ["h3", "tinyhttp", "hono", "elysia"], + "url": {"type": "e18e", "id": "express"} + }, "ez-spawn": { "type": "module", "moduleName": "ez-spawn", From c8efbecfaaa2f1ef2c0f65b7c174da68d8848f80 Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 13 Mar 2026 10:48:29 +0000 Subject: [PATCH 04/10] wip --- manifests/preferred.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/manifests/preferred.json b/manifests/preferred.json index 5903e109..01e320b1 100644 --- a/manifests/preferred.json +++ b/manifests/preferred.json @@ -2777,6 +2777,12 @@ "url": {"type": "e18e", "id": "dot-prop"}, "replacementModule": "dlv" }, + "elysia": { + "id": "elysia", + "type": "documented", + "url": {"type": "e18e", "id": "express"}, + "replacementModule": "elysia" + }, "emoji-regex-xs": { "id": "emoji-regex-xs", "type": "documented", @@ -2918,6 +2924,18 @@ }, "url": {"type": "node", "id": "api/fs.html#fspromisesrmdirpath-options"} }, + "h3": { + "id": "h3", + "type": "documented", + "url": {"type": "e18e", "id": "express"}, + "replacementModule": "h3" + }, + "hono": { + "id": "hono", + "type": "documented", + "url": {"type": "e18e", "id": "express"}, + "replacementModule": "hono" + }, "isBuiltin": { "id": "isBuiltin", "type": "native", @@ -3141,6 +3159,12 @@ "url": {"type": "e18e", "id": "execa"}, "replacementModule": "tinyexec" }, + "tinyhttp": { + "id": "tinyhttp", + "type": "documented", + "url": {"type": "e18e", "id": "express"}, + "replacementModule": "@tinyhttp/app" + }, "tinyglobby": { "id": "tinyglobby", "type": "documented", From f106bf2f807ca75fbf19e977194a55697c6d6b2f Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 13 Mar 2026 10:49:48 +0000 Subject: [PATCH 05/10] fix --- manifests/preferred.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/preferred.json b/manifests/preferred.json index 01e320b1..0c71a48f 100644 --- a/manifests/preferred.json +++ b/manifests/preferred.json @@ -3159,18 +3159,18 @@ "url": {"type": "e18e", "id": "execa"}, "replacementModule": "tinyexec" }, - "tinyhttp": { - "id": "tinyhttp", - "type": "documented", - "url": {"type": "e18e", "id": "express"}, - "replacementModule": "@tinyhttp/app" - }, "tinyglobby": { "id": "tinyglobby", "type": "documented", "url": {"type": "e18e", "id": "fast-glob"}, "replacementModule": "tinyglobby" }, + "tinyhttp": { + "id": "tinyhttp", + "type": "documented", + "url": {"type": "e18e", "id": "express"}, + "replacementModule": "@tinyhttp/app" + }, "unicode-segmenter": { "id": "unicode-segmenter", "type": "documented", From b63cc8a8287461c3488b41af05569d077adb5312 Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 13 Mar 2026 11:59:13 +0000 Subject: [PATCH 06/10] update documentation --- docs/modules/express.md | 71 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/docs/modules/express.md b/docs/modules/express.md index 114c74a7..1b6f53c4 100644 --- a/docs/modules/express.md +++ b/docs/modules/express.md @@ -4,10 +4,81 @@ description: Modern alternatives to the express package # Replacements for `express` +Express has been the industry standard for years, but the ecosystem has shifted toward ESM-first, type-safe, and runtime-agnostic frameworks that offer significantly better performance and developer experience. + ## `h3` +[`h3`](https://github.com/h3js/h3) is a minimal H(TTP) framework built for high performance and portability. It is the engine behind Nuxt and Nitro, designed to work anywhere (Node.js, Workers, Deno, Bun). + +Example: + +```ts +import express from 'express' // [!code --] +import { H3, defineHandler, toNodeHandler } from 'h3' // [!code ++] +import { createServer } from 'node:http' // [!code ++] + +const app = express() // [!code --] +const app = new H3() // [!code ++] + +app.get('/', (req, res) => res.send('Hello world')) // [!code --] +app.get('/', defineHandler(() => 'Hello world')) // [!code ++] + +app.listen(3000) // [!code --] +createServer(toNodeHandler(app)).listen(3000) // [!code ++] +``` + ## `tinyhttp` +[`tinyhttp`](https://github.com/tinyhttp/tinyhttp) is a modern, Express-like web framework written in TypeScript. It is designed to be a drop-in replacement that is significantly lighter and faster while remaining compatible with many Express middlewares. + +Example: + +```ts +import express from 'express' // [!code --] +import { App } from '@tinyhttp/app' // [!code ++] + +const app = express() // [!code --] +const app = new App() // [!code ++] + +app.get('/', (req, res) => res.send('Hello world')) // [!code --] + +app.listen(3000) +``` + ## `hono` +[`hono`](https://github.com/honojs/hono) is a small, simple, and ultrafast web framework for the Edges. It has excellent TypeScript support and built-in middleware for common tasks without the overhead of heavy dependencies. + +Example: + +```ts +import express from 'express' // [!code --] +import { Hono } from 'hono' // [!code ++] + +const app = express() // [!code --] +const app = new Hono() // [!code ++] + +app.get('/', (req, res) => res.send('Hello world')) // [!code --] +app.get('/', (context) => context.text('Hello world')) // [!code ++] + +export default app // [!code ++] +``` + ## `elysia` + +If you are using Bun, [`elysia`](https://github.com/elysiajs/elysia) is often the best choice. It is specifically optimized for the Bun runtime and provides "End-to-End Type Safety," allowing your frontend to inherit types directly from your backend. + +Example: + +```ts +import express from 'express' // [!code --] +import { Elysia } from 'elysia' // [!code ++] + +const app = express() // [!code --] +const app = new Elysia() // [!code ++] + +app.get('/', (req, res) => res.send('Hello world')) // [!code --] +app.get('/', () => 'Hello world') // [!code ++] + +app.listen(3000) +``` From 25961dea6bbb7f51eb54ebae6d72ffbbcba7924c Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 13 Mar 2026 12:02:14 +0000 Subject: [PATCH 07/10] fix --- docs/modules/express.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/modules/express.md b/docs/modules/express.md index 1b6f53c4..e7252da5 100644 --- a/docs/modules/express.md +++ b/docs/modules/express.md @@ -12,6 +12,7 @@ Express has been the industry standard for years, but the ecosystem has shifted Example: + ```ts import express from 'express' // [!code --] import { H3, defineHandler, toNodeHandler } from 'h3' // [!code ++] From 7eac53e6301aab1ea2a3c91e6f606e24dc2b3be8 Mon Sep 17 00:00:00 2001 From: Roman Date: Sat, 14 Mar 2026 03:48:18 +0000 Subject: [PATCH 08/10] fix --- manifests/preferred.json | 1 + 1 file changed, 1 insertion(+) diff --git a/manifests/preferred.json b/manifests/preferred.json index c75bc688..5dfd54b4 100644 --- a/manifests/preferred.json +++ b/manifests/preferred.json @@ -2959,6 +2959,7 @@ "type": "documented", "url": {"type": "e18e", "id": "express"}, "replacementModule": "h3" + }, "hono": { "id": "hono", "type": "documented", From 1f9fe31d8e32c631b2d9f726720b98d909f64915 Mon Sep 17 00:00:00 2001 From: Roman Date: Sat, 14 Mar 2026 18:42:26 +0000 Subject: [PATCH 09/10] update docs --- docs/modules/express.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/modules/express.md b/docs/modules/express.md index e7252da5..bf84db50 100644 --- a/docs/modules/express.md +++ b/docs/modules/express.md @@ -8,7 +8,7 @@ Express has been the industry standard for years, but the ecosystem has shifted ## `h3` -[`h3`](https://github.com/h3js/h3) is a minimal H(TTP) framework built for high performance and portability. It is the engine behind Nuxt and Nitro, designed to work anywhere (Node.js, Workers, Deno, Bun). +[`h3`](https://github.com/h3js/h3) is a minimal H(TTP) framework built for high performance and portability. Example: @@ -30,7 +30,7 @@ createServer(toNodeHandler(app)).listen(3000) // [!code ++] ## `tinyhttp` -[`tinyhttp`](https://github.com/tinyhttp/tinyhttp) is a modern, Express-like web framework written in TypeScript. It is designed to be a drop-in replacement that is significantly lighter and faster while remaining compatible with many Express middlewares. +[`tinyhttp`](https://github.com/tinyhttp/tinyhttp) is designed to be a drop-in replacement remaining compatible with many Express middlewares. Example: @@ -41,14 +41,14 @@ import { App } from '@tinyhttp/app' // [!code ++] const app = express() // [!code --] const app = new App() // [!code ++] -app.get('/', (req, res) => res.send('Hello world')) // [!code --] +app.get('/', (req, res) => res.send('Hello world')) app.listen(3000) ``` ## `hono` -[`hono`](https://github.com/honojs/hono) is a small, simple, and ultrafast web framework for the Edges. It has excellent TypeScript support and built-in middleware for common tasks without the overhead of heavy dependencies. +[`hono`](https://github.com/honojs/hono) is a small, simple, and fast web framework for the Edges. Example: @@ -67,7 +67,7 @@ export default app // [!code ++] ## `elysia` -If you are using Bun, [`elysia`](https://github.com/elysiajs/elysia) is often the best choice. It is specifically optimized for the Bun runtime and provides "End-to-End Type Safety," allowing your frontend to inherit types directly from your backend. +If you are using Bun, [`elysia`](https://github.com/elysiajs/elysia) is often the best choice. Example: From c972ea00afb1400a6af066a29a434cd6ae3dead1 Mon Sep 17 00:00:00 2001 From: Roman Date: Sat, 14 Mar 2026 21:17:55 +0000 Subject: [PATCH 10/10] update elysia note --- docs/modules/express.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/express.md b/docs/modules/express.md index bf84db50..eb276310 100644 --- a/docs/modules/express.md +++ b/docs/modules/express.md @@ -67,7 +67,7 @@ export default app // [!code ++] ## `elysia` -If you are using Bun, [`elysia`](https://github.com/elysiajs/elysia) is often the best choice. +If you are using Bun, [`elysia`](https://github.com/elysiajs/elysia) is often the best choice as it is specifically optimized for the Bun runtime. Example: