From f2d2528afe5e3676d08f12b68ba6dcc48838aa6d Mon Sep 17 00:00:00 2001 From: John Smith Date: Wed, 10 Jul 2019 15:30:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4=E7=AB=AF?= =?UTF-8?q?=E5=8F=A3=E4=B8=BA12450?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 ++-- README.md | 6 +++--- frontend/src/main.js | 4 ++-- frontend/src/views/Room.vue | 4 ++-- main.py | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9d2a091..58889d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,6 +28,6 @@ RUN npm run build # 运行 WORKDIR /blivechat -EXPOSE 80 +EXPOSE 12450 ENTRYPOINT ["python3", "main.py"] -CMD ["--host", "0.0.0.0", "--port", "80"] +CMD ["--host", "0.0.0.0", "--port", "12450"] diff --git a/README.md b/README.md index 92b984c..3f6f4be 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ 1. 下载[发布版](https://github.com/xfgryujk/blivechat/releases)(仅提供x64 Windows版) 2. 双击`blivechat.exe`运行服务器,或者用命令行可以指定host和端口号: ```bat - blivechat.exe --host 127.0.0.1 --port 80 + blivechat.exe --host 127.0.0.1 --port 12450 ``` 3. 用浏览器打开[http://localhost](http://localhost),输入房间ID,保存配置,进入房间,复制房间URL 4. (可选)用样式生成器生成样式,复制CSS @@ -39,7 +39,7 @@ ``` 或者可以指定host和端口号: ```sh - python3 main.py --host 127.0.0.1 --port 80 + python3 main.py --host 127.0.0.1 --port 12450 ``` 3. 用浏览器打开[http://localhost](http://localhost),输入房间ID,保存配置,进入房间,复制房间URL 4. (可选)用样式生成器生成样式,复制CSS @@ -47,6 +47,6 @@ ### Docker 1. ```sh - docker run -d -p 80:80 xfgryujk/blivechat:latest + docker run -d -p 12450:12450 xfgryujk/blivechat:latest ``` 2. 以下略 diff --git a/frontend/src/main.js b/frontend/src/main.js index c4b86f9..7f9eb3d 100644 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -17,8 +17,8 @@ import ja from './lang/ja' import en from './lang/en' if (process.env.NODE_ENV === 'development') { - // 开发时使用localhost:80 - axios.defaults.baseURL = 'http://localhost' + // 开发时使用localhost:12450 + axios.defaults.baseURL = 'http://localhost:12450' } Vue.use(VueRouter) diff --git a/frontend/src/views/Room.vue b/frontend/src/views/Room.vue index d7f321e..de3e243 100644 --- a/frontend/src/views/Room.vue +++ b/frontend/src/views/Room.vue @@ -33,8 +33,8 @@ export default { } }, async created() { - // 开发时使用localhost:80 - const url = process.env.NODE_ENV === 'development' ? 'ws://localhost/chat' : `ws://${window.location.host}/chat` + // 开发时使用localhost:12450 + const url = process.env.NODE_ENV === 'development' ? 'ws://localhost:12450/chat' : `ws://${window.location.host}/chat` this.websocket = new WebSocket(url) this.websocket.onopen = this.onWsOpen.bind(this) this.websocket.onmessage = this.onWsMessage.bind(this) diff --git a/main.py b/main.py index 64a5c9f..a85caa6 100644 --- a/main.py +++ b/main.py @@ -20,7 +20,7 @@ WEB_ROOT = os.path.join(os.path.dirname(__file__), 'frontend', 'dist') def main(): parser = argparse.ArgumentParser(description='用于OBS的仿YouTube风格的bilibili直播聊天层') parser.add_argument('--host', help='服务器host,默认为127.0.0.1', default='127.0.0.1') - parser.add_argument('--port', help='服务器端口,默认为80', type=int, default=80) + parser.add_argument('--port', help='服务器端口,默认为12450', type=int, default=12450) parser.add_argument('--debug', help='调试模式', action='store_true') args = parser.parse_args()