mirror of
https://github.com/xfgryujk/blivechat.git
synced 2025-01-13 13:50:10 +08:00
修改默认端口为12450
This commit is contained in:
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)
|
||||
|
2
main.py
2
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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user