|
@@ -27,15 +27,20 @@ export default class AdminCommands extends Vue {
|
|
|
|
|
|
socket = null
|
|
socket = null
|
|
responses = []
|
|
responses = []
|
|
|
|
+ url = 'http://localhost:3111'
|
|
|
|
|
|
connect(){
|
|
connect(){
|
|
- const socket = io.connect()
|
|
|
|
|
|
+ const socket = io.connect(this.url)
|
|
let cnt = 0;
|
|
let cnt = 0;
|
|
socket.on('admin_response', (data) => {
|
|
socket.on('admin_response', (data) => {
|
|
cnt++;
|
|
cnt++;
|
|
this.responses.unshift({cnt, data: JSON.stringify(data,null,3)})
|
|
this.responses.unshift({cnt, data: JSON.stringify(data,null,3)})
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+ socket.on('connect', (ws) => {
|
|
|
|
+ console.info('admin connected', ws, socket?.id)
|
|
|
|
+ });
|
|
|
|
+
|
|
socket.connect();
|
|
socket.connect();
|
|
this.socket = socket;
|
|
this.socket = socket;
|
|
}
|
|
}
|