Dev-server proxies /api and WS request to backend.

This commit is contained in:
2020-12-06 23:19:15 +01:00
parent 9265572e45
commit 1839810e66
7 changed files with 131 additions and 149 deletions

View File

@@ -94,8 +94,7 @@ export default {
this.socket = null;
},
mounted() {
const BASE_URL = __APIURL__ || window.location.origin;
this.socket = io(`${BASE_URL}`);
this.socket = io(window.location.origin);
this.socket.on("chat", msg => {
this.chatHistory.push(msg);
});