change socket settings
This commit is contained in:
@@ -20,9 +20,7 @@ import gamehubRouter from './routers/gamehub'
|
||||
import escRouter from './routers/esc'
|
||||
import connectmeRouter from './routers/connectme'
|
||||
import questioneerRouter from './routers/questioneer'
|
||||
import { setIo, getIo } from './io'
|
||||
// Импорт обработчика чата
|
||||
const { initializeChatSocket } = require('./routers/kfu-m-24-1/sber_mobile/socket-chat')
|
||||
import { setIo } from './io'
|
||||
|
||||
export const app = express()
|
||||
|
||||
@@ -67,15 +65,6 @@ const initServer = async () => {
|
||||
console.log('warming up 🔥')
|
||||
|
||||
const server = setIo(app)
|
||||
|
||||
// Инициализация Socket.IO для чата
|
||||
const io = getIo()
|
||||
if (io) {
|
||||
const chatHandler = initializeChatSocket(io)
|
||||
// Сохраняем ссылку на chat handler для доступа из эндпоинтов
|
||||
io.chatHandler = chatHandler
|
||||
console.log('✅ Socket.IO для чата инициализирован')
|
||||
}
|
||||
|
||||
const sess = {
|
||||
secret: "super-secret-key",
|
||||
|
||||
Reference in New Issue
Block a user