Skip to content

Commit c0d8bf7

Browse files
committed
fix: 修复第7章节内容错误
1 parent 32c1447 commit c0d8bf7

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/7/7.1.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ hono的一些解读
1111

1212
类型不错,入门好。源码里使用了vitest,np是有品的。tsc,中规中矩。这里面最难的,是如何抹平那么多runtime的差异,这部分设计的还是可圈可点的。
1313

14-
1Hono不是为node设计的,但有适配器,问题不大
15-
2Who is using Hono? 基本都是faas & worker相关的
16-
3使用的是Web 标准,api会有差异
17-
4中间件 基本都有,官方18个左右
14+
1. Hono不是为node设计的,但有适配器,问题不大
15+
2. Who is using Hono? 基本都是faas & worker相关的
16+
3. 使用的是Web 标准,api会有差异
17+
4. 中间件 基本都有,官方18个左右
1818

1919
性能不错的。生态可能偏初期,趟坑要有准备。10k star,非常活跃,api极简。大家能接受自己定制即可选用。
2020

@@ -29,33 +29,33 @@ hono的一些解读
2929
1. 确保你已经安装了 Node.js:你可以在终端中运行 node -v 和 npm -v 来检查是否已安装。
3030
2. 创建一个新的项目目录:
3131

32-
```
32+
```bash
3333
$ mkdir my-hono-project
3434
$ cd my-hono-project
3535
```
3636
3. 初始化 npm 项目:
3737

38-
```
38+
```bash
3939
$ npm init -y
4040
```
4141
4. 安装 Hono.js:
4242

43-
```
43+
```bash
4444
$ npm install hono
4545
```
4646

47-
创建一个基本的服务器文件:在项目根目录下创建一个 index.js 文件,并添加以下代码:
47+
5. 创建一个基本的服务器文件:在项目根目录下创建一个 index.js 文件,并添加以下代码:
4848

49-
```
49+
```js
5050
const { Hono } = require('hono')
5151
const app = new Hono()
5252

5353
app.get('/', (c) => c.text('Hello Hono!'))
5454
```
5555

56-
运行你的 Hono.js 服务器:
56+
6. 运行你的 Hono.js 服务器:
5757

58-
```
58+
```bash
5959
node index.js
6060
```
6161

@@ -74,7 +74,7 @@ node index.js
7474

7575
## 更好一点的做法
7676

77-
```
77+
```bash
7878
$ npm create hono@latest
7979
```
8080

0 commit comments

Comments
 (0)