Merge pull request #127 from StarHeartHunt/patch-1

Update getting-started.md
This commit is contained in:
Richard Chien 2020-01-15 23:04:12 +08:00 committed by GitHub
commit 5849fdcf4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,6 +47,10 @@ Running on https://127.0.0.1:8080 (CTRL + C to quit)
如果你在之前已经按照 [安装](/guide/installation.md) 的建议使用默认配置运行了一次 CoolQ HTTP API 插件,此时 酷Q 的 `data/app/io.github.richardchien.coolqhttpapi/config/` 目录中应该已经有了一个名为 `<user-id>.json` 的文件(`<user-id>` 为你登录的 QQ 账号)。修改这个文件,**修改如下配置项(如果不存在相应字段则添加)**
::: warning 注意
如果使用 CoolQ HTTP API 插件官方 Docker 镜像运行 酷Q则配置文件所在目录可能是 `app/io.github.richardchien.coolqhttpapi/config/`
:::
```json
{
"ws_reverse_api_url": "ws://127.0.0.1:8080/ws/api/",
@ -59,10 +63,6 @@ Running on https://127.0.0.1:8080 (CTRL + C to quit)
**这里的 `127.0.0.1:8080` 对应 `nonebot.run()` 中传入的 `host``port`**,如果在 `nonebot.run()` 中传入的 `host``0.0.0.0`,则插件的配置中需使用任意一个能够访问到 NoneBot 所在环境的 IP**不要直接填 `0.0.0.0`**。特别地,如果你的 酷Q 运行在 Docker 容器中NoneBot 运行在宿主机中,则默认情况下这里需使用 `172.17.0.1`(即宿主机在 Docker 默认网桥上的 IP不同机器有可能不同如果是 macOS 系统或者 Windows 系统,可以考虑使用 `host.docker.internal`,具体解释详见 Docker 文档的 [Use cases and workarounds](https://docs.docker.com/docker-for-mac/networking/#use-cases-and-workarounds) 的「I WANT TO CONNECT FROM A CONTAINER TO A SERVICE ON THE HOST」小标题
:::
::: warning 注意
如果使用 CoolQ HTTP API 插件官方 Docker 镜像运行 酷Q则配置文件所在目录可能是 `app/io.github.richardchien.coolqhttpapi/config/`
:::
修改之后,在 酷Q 的应用菜单中重启 CoolQ HTTP API 插件,或直接重启 酷Q以使新的配置文件生效。
## 历史性的第一次对话