feat(server): 增加根路径服务首页,完善文档中的访问地址说明

This commit is contained in:
LoveChengke committed 2026-09-11 22:01:32 +08:00
1 parent 84ab49de10
commit 4566d7cd5e
2 files changed
+85 -5

No files matched your search

+11 -5
View File
@@ -99,11 +99,17 @@ pnpm dev
启动后访问:
| 服务 | 地址 |
| ------------------ | -------------------------------- |
| Web 管理端(开发) | http://127.0.0.1:5173 |
| 后端 API | http://127.0.0.1:4000/api |
| 健康检查 | http://127.0.0.1:4000/api/health |
| 服务 | 地址 |
| ------------------------------------------ | -------------------------------- |
| Web 管理端(开发) | http://127.0.0.1:5173 |
| 后端服务首页(浏览器可读,列出已挂载模块) | http://127.0.0.1:4000 |
| 后端 API | http://127.0.0.1:4000/api |
| 健康检查 | http://127.0.0.1:4000/api/health |
> 后端只提供 REST API 与 WebSocket,没有业务网页界面。直接访问
> `http://127.0.0.1:4000/` 会返回服务首页(带 `Accept: application/json` 时返回结构化信息);
> 其它未匹配路径统一返回 `{ "success": false, "code": "NOT_FOUND" }`。
> Web 管理端地址是 **5173** 端口,请勿访问 80 端口(会连接被拒绝)。
也可以分开启动:`pnpm dev:server`(仅后端)、`pnpm dev:web`(仅 Web 端)。