diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 6e7bb6698..739f09b7f 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -40,7 +40,7 @@ jobs: ghcr.io/csesoc/structs-${{ matrix.component }}:${{ github.sha }} ghcr.io/csesoc/structs-${{ matrix.component }}:latest labels: ${{ steps.meta.outputs.labels }} - build-args: "VITE_DEBUGGER_URL=https://structs.sh/debugger" + build-args: "VITE_DEBUGGER_URL=https://structs.sh" deploy: name: Deploy (CD) runs-on: ubuntu-latest diff --git a/client/src/Services/socketClient.ts b/client/src/Services/socketClient.ts index 64faff719..88750de13 100644 --- a/client/src/Services/socketClient.ts +++ b/client/src/Services/socketClient.ts @@ -4,7 +4,7 @@ import { create } from 'zustand'; import { ServerToClientEvent } from './socketClientType'; import { ClientToServerEvents } from './socketServerType'; -const URL = import.meta.env.VITE_DEBUGGER_URL || 'https://localhost:8000'; +const URL = import.meta.env.VITE_DEBUGGER_URL || 'http://localhost:8000'; class SocketClient { socket: Socket; @@ -34,7 +34,7 @@ class SocketClient { } constructor() { - this.socket = io(URL); + this.socket = io(URL, { path: "/debugger" }); this.setupDefaultEvents(); this.socket.connect(); } diff --git a/debugger2/src/serve.py b/debugger2/src/serve.py index a579a0ba8..e07343f91 100644 --- a/debugger2/src/serve.py +++ b/debugger2/src/serve.py @@ -139,7 +139,7 @@ async def send_stdin(sid: str) -> None: error("event 'send_stdin' not implemented") -app = ASGIApp(server) +app = ASGIApp(server, socketio_path="/debugger") if __name__ == "__main__": host = "0.0.0.0" @@ -148,6 +148,6 @@ async def send_stdin(sid: str) -> None: info(" /\\_/\\ ") info("( ^.^ )") info(" > ^ < ") - info(f"Server is available at [http://{host}:{port}]") + info(f"Server is available at [http://localhost:{port}/]") run("__main__:app", port=port, host=host, log_level="error")