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