Skip to content

Commit

Permalink
feat(api): change socketio path to /debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinosu committed Jan 6, 2025
1 parent d52aef8 commit e961733
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions client/src/Services/socketClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ServerToClientEvent, ClientToServerEvents>;
Expand Down Expand Up @@ -34,7 +34,7 @@ class SocketClient {
}

constructor() {
this.socket = io(URL);
this.socket = io(URL, { path: "/debugger" });
this.setupDefaultEvents();
this.socket.connect();
}
Expand Down
4 changes: 2 additions & 2 deletions debugger2/src/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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")

0 comments on commit e961733

Please sign in to comment.