This commit is contained in:
2024-05-29 16:46:58 +02:00
parent f8205f374a
commit 851c9a5190
7 changed files with 128 additions and 12 deletions
-8
View File
@@ -1,13 +1,5 @@
<script setup lang="ts">
import { setupWebsocket } from '~/netcode';
const socket = await setupWebsocket()
socket.onmessage = (e) => {
console.log(JSON.parse(e.data))
}
onUnmounted(() => {
socket.close()
})
</script>
<template>