1
0
forked from noxious/server

Minor improvement

This commit is contained in:
Dennis Postma 2025-02-12 15:58:37 +01:00
parent 22b776ef0f
commit b508370eec
2 changed files with 2 additions and 3 deletions

View File

@ -5,7 +5,6 @@ import Logger, { LoggerType } from '@/application/logger'
import Storage from '@/application/storage' import Storage from '@/application/storage'
import type { TSocket, UUID } from '@/application/types' import type { TSocket, UUID } from '@/application/types'
import { Authentication } from '@/middleware/authentication' import { Authentication } from '@/middleware/authentication'
import type { Application } from 'express'
import { Server as SocketServer } from 'socket.io' import { Server as SocketServer } from 'socket.io'
class SocketManager { class SocketManager {
@ -15,7 +14,7 @@ class SocketManager {
/** /**
* Initialize Socket.IO server * Initialize Socket.IO server
*/ */
public async boot(app: Application, http: HTTPServer): Promise<void> { public async boot(http: HTTPServer): Promise<void> {
this.io = new SocketServer(http) this.io = new SocketServer(http)
// Apply authentication middleware // Apply authentication middleware

View File

@ -21,7 +21,7 @@ export class Server {
// Initialize managers // Initialize managers
await Promise.all([ await Promise.all([
HttpManager.boot(HttpManager.getAppInstance()), HttpManager.boot(HttpManager.getAppInstance()),
SocketManager.boot(HttpManager.getAppInstance(), HttpManager.getServerInstance()), SocketManager.boot(HttpManager.getServerInstance()),
QueueManager.boot(), QueueManager.boot(),
UserManager.boot(), UserManager.boot(),
MapManager.boot(), MapManager.boot(),