dockerized
This commit is contained in:
@ -20,7 +20,7 @@ app.use(createPinia())
|
||||
app.use(i18n)
|
||||
app.use(router)
|
||||
|
||||
app.provide('socket', new SocketIoClientService('http://localhost:3000'))
|
||||
app.provide('socket', new SocketIoClientService(import.meta.env.VITE_SOCKET_URL))
|
||||
app.provide('logger', new LoggingService())
|
||||
app.provide('auth', new AuthenticationService())
|
||||
app.provide('game', new GameService())
|
||||
|
@ -11,6 +11,7 @@ export class SocketIoClientService extends ServiceBase {
|
||||
|
||||
constructor(private url: string) {
|
||||
super()
|
||||
console.log('SOCKET: url :>> ', url)
|
||||
this.gameEventManager = new SocketIoEventManager(this)
|
||||
}
|
||||
|
||||
@ -21,6 +22,7 @@ export class SocketIoClientService extends ServiceBase {
|
||||
if (!isLoggedIn) {
|
||||
reject('Not logged in')
|
||||
}
|
||||
console.log('this.url :>> ', this.url)
|
||||
this.socket = io(this.url, {
|
||||
auth: {
|
||||
token: jwt.value,
|
||||
|
@ -117,7 +117,6 @@ async function joinMatch(id: string) {
|
||||
if (id) {
|
||||
await socketService.connect()
|
||||
await gameService.joinMatchSession(id)
|
||||
router.push({ name: 'match', params: { id } })
|
||||
}
|
||||
}
|
||||
async function deleteMatch(id: string) {
|
||||
|
Reference in New Issue
Block a user