figure out how socketio works

This commit is contained in:
Simone Tesini 2025-08-02 01:58:29 +02:00
parent c2cf582ca4
commit 59dfbbeca9
5 changed files with 399 additions and 3 deletions

View file

@ -0,0 +1,8 @@
<script lang="ts">
import { io } from "socket.io-client"
const socket = io("/", { path: "/ws" })
socket.on("connect", () => {
console.log("successfully connected to socket.io server")
socket.emit("join_room", { id: "gang" })
})
</script>