18 lines
421 B
TypeScript
18 lines
421 B
TypeScript
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 } |