figure out how socketio works
This commit is contained in:
parent
c2cf582ca4
commit
59dfbbeca9
5 changed files with 399 additions and 3 deletions
8
frontend/src/routes/zesty/wsio/+page.svelte
Normal file
8
frontend/src/routes/zesty/wsio/+page.svelte
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue