feat(wip): 前后端通訊基礎類

This commit is contained in:
CrescentLeaf
2025-08-31 13:19:49 +08:00
parent f48b6567cd
commit a316eef807

11
client/api/Client.ts Normal file
View File

@@ -0,0 +1,11 @@
import { io, Socket } from 'https://unpkg.com/socket.io-client@4.8.1/dist/socket.io.esm.min.js'
class Client {
static socket: Socket
static connect() {
this.socket && this.socket.disconnect()
this.socket = io()
}
}
export default Client