@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.
Files changed (2) hide show
  1. package/README.md +5 -3
  2. 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
- 仓库已配置为可发布的 npm CLI 包(包名与命令名均为 `daily-hot-api`)。发布到 npm 后可以全局安装,在任意目录启动/停止服务:
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 接口
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttkit/daily-hot-api",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "一个基于 NestJS 的每日热榜聚合 API 服务,支持多个平台的热榜数据获取,支持本地部署、pm2部署、docker部署,并提供可全局安装的 CLI 启动/停止热点服务。",
5
5
  "author": "Helti",
6
6
  "license": "MIT",