@faapi/faapi 0.0.0-canary.e24fdb7 → 0.0.0-canary.ede2e84
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 +7 -1
- package/dist/cli/index.js +6057 -5253
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +399 -66
- package/dist/index.js +2825 -167
- package/dist/index.js.map +1 -1
- package/package.json +6 -7
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ pnpm add @faapi/faapi
|
|
|
12
12
|
npm install @faapi/faapi
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
要求 Node.js >=
|
|
15
|
+
要求 Node.js >= 24。faapi 仅支持 ESM(`type: "module"`),不提供 CJS 产物。
|
|
16
16
|
|
|
17
17
|
## 快速开始
|
|
18
18
|
|
|
@@ -35,6 +35,12 @@ npx faapi
|
|
|
35
35
|
|
|
36
36
|
访问 `http://localhost:3000/api/user?page=1&pageSize=10` 即可。
|
|
37
37
|
|
|
38
|
+
```bash
|
|
39
|
+
# 生产部署
|
|
40
|
+
faapi build # 编译 .ts → dist/,生成路由清单 + schema + dist/main.js
|
|
41
|
+
node dist/main # 启动生产服务器
|
|
42
|
+
```
|
|
43
|
+
|
|
38
44
|
## 核心能力
|
|
39
45
|
|
|
40
46
|
- 函数即接口:导出 `GET`/`POST` 等函数即声明路由
|