Skip to content

Commit e961733

Browse files
committed
feat(api): change socketio path to /debugger
1 parent d52aef8 commit e961733

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
ghcr.io/csesoc/structs-${{ matrix.component }}:${{ github.sha }}
4141
ghcr.io/csesoc/structs-${{ matrix.component }}:latest
4242
labels: ${{ steps.meta.outputs.labels }}
43-
build-args: "VITE_DEBUGGER_URL=https://structs.sh/debugger"
43+
build-args: "VITE_DEBUGGER_URL=https://structs.sh"
4444
deploy:
4545
name: Deploy (CD)
4646
runs-on: ubuntu-latest

client/src/Services/socketClient.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { create } from 'zustand';
44
import { ServerToClientEvent } from './socketClientType';
55
import { ClientToServerEvents } from './socketServerType';
66

7-
const URL = import.meta.env.VITE_DEBUGGER_URL || 'https://localhost:8000';
7+
const URL = import.meta.env.VITE_DEBUGGER_URL || 'http://localhost:8000';
88

99
class SocketClient {
1010
socket: Socket<ServerToClientEvent, ClientToServerEvents>;
@@ -34,7 +34,7 @@ class SocketClient {
3434
}
3535

3636
constructor() {
37-
this.socket = io(URL);
37+
this.socket = io(URL, { path: "/debugger" });
3838
this.setupDefaultEvents();
3939
this.socket.connect();
4040
}

debugger2/src/serve.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ async def send_stdin(sid: str) -> None:
139139
error("event 'send_stdin' not implemented")
140140

141141

142-
app = ASGIApp(server)
142+
app = ASGIApp(server, socketio_path="/debugger")
143143

144144
if __name__ == "__main__":
145145
host = "0.0.0.0"
@@ -148,6 +148,6 @@ async def send_stdin(sid: str) -> None:
148148
info(" /\\_/\\ ")
149149
info("( ^.^ )")
150150
info(" > ^ < ")
151-
info(f"Server is available at [http://{host}:{port}]")
151+
info(f"Server is available at [http://localhost:{port}/]")
152152

153153
run("__main__:app", port=port, host=host, log_level="error")

0 commit comments

Comments
 (0)