first init

This commit is contained in:
Power BI Dev
2026-08-17 10:52:09 +07:00
commit 88c7c653c2
9281 changed files with 2156575 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
import http from 'http';
import { Server as SocketIOServer } from 'socket.io';
import { createApp } from './app.js';
import { config } from './config.js';
import { setupSocketHandlers } from './socket/index.js';
import { startTtlCleanupSchedule } from './cron/cleanup.js';
const app = createApp();
const server = http.createServer(app);
const io = new SocketIOServer(server, {
cors: {
origin: '*',
methods: ['GET', 'POST', 'PATCH', 'DELETE'],
},
});
// Setup real-time Socket.io handlers & authorization
setupSocketHandlers(io);
// Start periodic 30-day TTL cleanup (runs every 24 hours)
startTtlCleanupSchedule(24);
server.listen(config.port, () => {
console.log(`🎮 [Retro Kanban Server] Running on http://localhost:${config.port}`);
console.log(`🛡️ Environment: ${config.nodeEnv}`);
});