@ttkit/daily-hot-api 0.1.0 → 0.1.2
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 +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -121,10 +121,10 @@ $ npm run start:prod
|
|
|
121
121
|
|
|
122
122
|
## 命令行工具(CLI)
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
已发布到 npm:**包名 `@ttkit/daily-hot-api`**,安装后终端命令仍为 **`daily-hot-api`**。全局安装后可以在任意目录启动/停止服务:
|
|
125
125
|
|
|
126
126
|
```bash
|
|
127
|
-
npm install -g daily-hot-api
|
|
127
|
+
npm install -g @ttkit/daily-hot-api
|
|
128
128
|
|
|
129
129
|
daily-hot-api # 前台启动,读取当前目录的 .env
|
|
130
130
|
daily-hot-api -p 6699 # 指定端口前台启动
|
|
@@ -134,7 +134,7 @@ daily-hot-api logs -f # 跟踪后台日志
|
|
|
134
134
|
daily-hot-api stop # 停止服务
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
从源码调试时,也可以构建后直接使用等价入口:
|
|
138
138
|
|
|
139
139
|
```bash
|
|
140
140
|
npm run build
|
|
@@ -142,6 +142,8 @@ node bin/daily-hot-api.js --help
|
|
|
142
142
|
node bin/daily-hot-api.js start -d --config .env
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
+
不想全局安装时可以直接用 npx:`npx @ttkit/daily-hot-api --help`。
|
|
146
|
+
|
|
145
147
|
CLI 会把运行状态和后台日志写入 `~/.daily-hot-api`(可用 `DAILY_HOT_API_HOME` 或 `--home` 修改),端口默认取 `.env` 的 `PORT`,否则 6689。完整命令、退出码和故障排查见[命令行工具文档](https://helti.github.io/daily-hot-api/guide/cli)。
|
|
146
148
|
|
|
147
149
|
## API 接口
|