Skip to content

Commit 9c53936

Browse files
committed
上线:删除socket端口连接
1 parent 7204f2a commit 9c53936

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ visit [http://localhost:8080/](http://localhost:8080/)
5858

5959
```
6060
npm install -g pm2 # install just once
61+
npm i -d
6162
npm run build
6263
npm run deploy
6364
```

src/components/Chat/Chat.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default {
5252
};
5353
},
5454
mounted() {
55-
const socket = window.io(':8080');
55+
const socket = window.io('/');
5656
const that = this;
5757
// 告诉socket server该用户登录的动作
5858
let time = moment().format('YYYY/MM/DD HH:mm:ss');
@@ -138,7 +138,7 @@ export default {
138138
'addPrivateRecord',
139139
]),
140140
sendMsg() {
141-
const socket = window.io(':8080');
141+
const socket = window.io('/');
142142
if (this.message.trim() !== '') {
143143
// 非群聊
144144
if (this.talkingTo !== -1) {

0 commit comments

Comments
 (0)