Commit 780d682 1 parent 00f142e commit 780d682 Copy full SHA for 780d682
File tree 1 file changed +9
-8
lines changed
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 13
13
日记默认保存在 ` ./logs/Hitokoto-api.log `
14
14
15
15
## 开始使用
16
- 环境安装: 参考 [ NodeBB] ( http://docs.nodebb-cn.org ) 的环境安装 : D
16
+ ~~ 环境安装: 参考 [ NodeBB] ( http://docs.nodebb-cn.org ) 的环境安装 : D ~~
17
17
18
- > ` yarn ` 可替换为 ` npm ` , 但并不推荐
18
+ ``` shell
19
+ sudo sh ./install.sh
20
+ ```
19
21
20
22
1 . ` cp config.example.json config.json ` 并配置好相关信息(设置 ` log_level ` 为 ` debug ` )
21
- 2 . ` yarn --production `
22
- 3 . ` yarn start `
23
+ 3 . ` pnpm run start `
23
24
4 . 进行第一轮测试,访问服务,看看是否存在异常
24
25
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小时进行一次)
You can’t perform that action at this time.
0 commit comments