Node rewrite

This commit is contained in:
2024-12-13 19:20:44 +01:00
parent 9c3e736bfc
commit 3826b14149
25 changed files with 2357 additions and 2749 deletions

18
src/index.ts Normal file
View File

@@ -0,0 +1,18 @@
import express from 'express'
import http from 'http'
import { Server } from 'socket.io'
import { connectDB } from './config/database'
import { setupGameSocket } from './sockets/gameSocket'
const app = express()
const server = http.createServer(app)
const io = new Server(server)
// Connexion à MongoDB
connectDB()
// Configuration de Socket.IO
setupGameSocket(io)
// Routes et Middlewares ici
export { app, server }