Skip to content

Commit 780d682

Browse files
committed
Update Readme
1 parent 00f142e commit 780d682

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

readme.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@
1313
日记默认保存在 `./logs/Hitokoto-api.log`
1414

1515
## 开始使用
16-
环境安装: 参考 [NodeBB](http://docs.nodebb-cn.org) 的环境安装 :D
16+
~~环境安装: 参考 [NodeBB](http://docs.nodebb-cn.org) 的环境安装 :D~~
1717

18-
> `yarn` 可替换为 `npm`, 但并不推荐
18+
```shell
19+
sudo sh ./install.sh
20+
```
1921

2022
1. `cp config.example.json config.json` 并配置好相关信息(设置 `log_level``debug`
21-
2. `yarn --production`
22-
3. `yarn start`
23+
3. `pnpm run start`
2324
4. 进行第一轮测试,访问服务,看看是否存在异常
2425
5. 无异常,将 `log_level` 设置为 `info`
25-
6. `yarn global add pm2` 使用指令来全局安装 pm2
26-
7. `pm2 startup` 使 pm2 开机自启动
27-
8. `pm2 core.js --name hitokoto` pm2 托管 api
28-
9. `pm2 save` 保存列表
26+
6. `sudo pm2 startup` 使 pm2 开机自启动
27+
7. `sudo pm2 core.js --name hitokoto` pm2 托管 api
28+
8. `sudo pm2 save` 保存列表
29+
9. 配置计划任务: 将 `./update.sh` 加入计划任务 (`crontab -e`, 3小时进行一次)

0 commit comments

Comments
 (0)