diff --git a/frontend/src/util/socket.ts b/frontend/src/util/socket.ts index 9abb192..40bf83a 100644 --- a/frontend/src/util/socket.ts +++ b/frontend/src/util/socket.ts @@ -1,7 +1,7 @@ import io from "socket.io-client"; -const socket = io("http://localhost:3001"); +const socket = io(window.location.protocol + "//" + window.location.hostname + ":3001"); export default socket; /**