Skip to content

Commit 8094831

Browse files
authored
docs: add hono link in web server (#7570)
1 parent eff73ec commit 8094831

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/document/main-doc/docs/en/guides/advanced-features/web-server.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Modern.js encapsulates most server-side capabilities required by projects, typic
88

99
## Starting a Custom Web Server
1010

11-
:::info
11+
:::tip
1212
You must ensure that the Modern.js version is x.67.5 or above.
1313
:::
1414

@@ -23,6 +23,8 @@ After executing the command, a `server/modern.server.ts` file will be automatica
2323

2424
## Capabilities of the Custom Web Server
2525

26+
Modern.js's Web Server is based on Hono, and in the latest version of the Custom Web Server, we expose Hono's middleware capabilities, you can refer to [Hono API](https://hono.dev/docs/api/context) for more usage.
27+
2628
In the `server/modern.server.ts` file, you can add the following configurations to extend the Server:
2729

2830
- **Middleware**

packages/document/main-doc/docs/zh/guides/advanced-features/web-server.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Modern.js 将大部分项目需要的服务端能力都进行了封装,通常
88

99
## 开启自定义 Web Server
1010

11-
:::info
11+
:::tip
1212
必须确保 Modern.js 版本是 x.67.5 及以上。
1313
:::
1414

@@ -23,6 +23,8 @@ Modern.js 将大部分项目需要的服务端能力都进行了封装,通常
2323

2424
## 自定义 Web Server 能力
2525

26+
Modern.js 的服务器基于 Hono 实现,在最新版本的自定义 Web Server 中,我们向用户暴露了 Hono 的中间件能力,你可以参考 [Hono 文档](https://hono.dev/docs/api/context) 了解更多用法。
27+
2628
`server/modern.server.ts` 文件中添加如下配置来扩展 Server:
2729

2830
- **中间件(Middleware)**

0 commit comments

Comments
 (0)