@celljs/express-adapter 4.6.0 → 4.7.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.
Files changed (2) hide show
  1. package/README.zh-cn.md +17 -0
  2. package/package.json +3 -3
@@ -0,0 +1,17 @@
1
+ # Cell - Express 适配器组件
2
+
3
+ HTTP 应用的后端入口:它启动应用并使用 `node:http` 服务。尽管名字,它不再依赖 express;处理器是 `@celljs/web` 的 `HttpServerUtil.createHandler()`。
4
+
5
+ ```bash
6
+ npm install @celljs/express-adapter
7
+ ```
8
+
9
+ 每个 HTTP 后端都需要它(`cell init` 模板包含它)。`node`、`cloudflare`、`fc`、`scf`、`lambda` 和 `vercel` preset 都运行这个入口;`cli` preset 不需要它。
10
+
11
+ | 键 | 默认值 | |
12
+ | --- | --- | --- |
13
+ | `server.host` | `127.0.0.1` | 在容器中使用 `0.0.0.0`:`CELL_SERVER__HOST=0.0.0.0` |
14
+ | `server.port` | `3000` | `CELL_SERVER__PORT` 覆盖它;`'${env.PORT}'` 跟随平台的 `PORT` |
15
+ | `server.path` | `/` | 每个路由的基础路径 |
16
+
17
+ 在 `cell dev` 和 `createTestApp()` 下,入口把其请求处理器交给工具链而不是自己监听。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/express-adapter",
3
- "version": "4.6.0",
3
+ "version": "4.7.0",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "cell-component"
@@ -31,8 +31,8 @@
31
31
  "watch": "tsc -b -w --preserveWatchOutput"
32
32
  },
33
33
  "dependencies": {
34
- "@celljs/core": "4.6.0",
35
- "@celljs/web": "4.6.0"
34
+ "@celljs/core": "4.7.0",
35
+ "@celljs/web": "4.7.0"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public"