establishing ws connection, starting on messages section
This commit is contained in:
@@ -10,8 +10,8 @@ class Connection {
|
||||
init = async () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const url = window.location.hostname.includes("local")
|
||||
? "ws://" + window.location.host
|
||||
: "wss://" + window.location.hostname + window.location.pathname;
|
||||
? "ws://" + window.location.host + "/ws"
|
||||
: "wss://" + window.location.hostname + window.location.pathname + "/ws";
|
||||
|
||||
this.ws = new WebSocket(url);
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ export default class Socket {
|
||||
}
|
||||
|
||||
async init() {
|
||||
console.log("initting")
|
||||
await this.connection.init()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user