feat: initial Regnum project structure (Vue3 + Phaser3 + Socket.io)
This commit is contained in:
commit
1db221e468
23 files changed
+1265
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import { io } from 'socket.io-client'
|
||||
|
||||
let socket = null
|
||||
|
||||
export function useSocket() {
|
||||
if (!socket) {
|
||||
socket = io(import.meta.env.VITE_SERVER_URL || 'http://localhost:3000', {
|
||||
autoConnect: true
|
||||
})
|
||||
}
|
||||
return socket
|
||||
}
|
||||
Reference in new issue
Block a user