修改默认端口为12450

pull/6/head v1.1.4
John Smith 5 years ago
parent d0fd997415
commit f2d2528afe

@ -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"]

@ -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. 以下略

@ -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)

@ -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)

@ -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()

Loading…
Cancel
Save