@hono/node-server 1.0.0-rc.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -7
- package/dist/vercel.d.ts +3 -0
- package/package.json +6 -7
- package/dist/nextjs.d.ts +0 -3
- /package/dist/{nextjs.js → vercel.js} +0 -0
package/README.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Node.js Adapter for Hono
|
|
2
2
|
|
|
3
|
-
This
|
|
4
|
-
Hono is ultrafast web framework for Cloudflare Workers, Deno, and Bun.
|
|
5
|
-
**It's not for Node.js**.
|
|
6
|
-
**BUT**, there may be a case that you really want to run on Node.js. This library is an adapter server that connects Hono and Node.js.
|
|
3
|
+
This adapter allows you to run your Hono application on Node.js. Initially, Hono wasn't designed for Node.js, but with this adapter, it can now be used with Node.js. It utilizes web standard APIs implemented in Node.js version 18 or higher.
|
|
7
4
|
|
|
8
|
-
Hono is ultra
|
|
5
|
+
While Hono is ultra-fast, it may not be as fast on Node.js due to the overhead involved in adapting Hono's API to Node.js.
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
However, it's worth noting that it is still faster than Express.
|
|
8
|
+
|
|
9
|
+
## Requirement
|
|
10
|
+
|
|
11
|
+
- Node.js version 18 or higher.
|
|
11
12
|
|
|
12
13
|
## Install
|
|
13
14
|
|
package/dist/vercel.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { Env, Hono } from 'hono';
|
|
3
|
+
export declare const handle: <E extends Env, S extends {}, BasePath extends string>(app: Hono<E, S, BasePath>) => (incoming: import("http").IncomingMessage, outgoing: import("http").ServerResponse<import("http").IncomingMessage>) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hono/node-server",
|
|
3
|
-
"version": "1.0.0
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Node.js Adapter for Hono",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
"exports": {
|
|
11
11
|
".": "./dist/index.js",
|
|
12
12
|
"./serve-static": "./dist/serve-static.js",
|
|
13
|
-
"./
|
|
13
|
+
"./vercel": "./dist/vercel.js"
|
|
14
14
|
},
|
|
15
15
|
"typesVersions": {
|
|
16
16
|
"*": {
|
|
17
17
|
"serve-static": [
|
|
18
18
|
"./dist/serve-static.d.ts"
|
|
19
19
|
],
|
|
20
|
-
"
|
|
21
|
-
"./dist/
|
|
20
|
+
"vercel": [
|
|
21
|
+
"./dist/vercel.d.ts"
|
|
22
22
|
]
|
|
23
23
|
}
|
|
24
24
|
},
|
|
@@ -49,8 +49,7 @@
|
|
|
49
49
|
"@types/supertest": "^2.0.12",
|
|
50
50
|
"hono": "^3.1.5",
|
|
51
51
|
"jest": "^29.0.3",
|
|
52
|
-
"
|
|
53
|
-
"np": "^7.6.2",
|
|
52
|
+
"np": "^7.7.0",
|
|
54
53
|
"rimraf": "^3.0.2",
|
|
55
54
|
"supertest": "^6.2.4",
|
|
56
55
|
"ts-jest": "^29.0.0",
|
package/dist/nextjs.d.ts
DELETED
|
File without changes
|