This commit is contained in:
SathishKannaa-HexrFactory
2025-01-22 16:59:14 +05:30
commit a28398259c
42 changed files with 2313 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import express from "express"
import { Response, Request } from "express";
import http from "http";
import dotenv from "dotenv"; // Import dotenv
dotenv.config();
import { initSocketServer } from "./socket/socketManager";
const app = express();
const PORT = process.env.SOCKET_PORT;
const server = http.createServer(app);
app.get('/', (req: Request, res: Response) => {
res.send('Hello, I am Major-Dwinzo RealTime!');
});
initSocketServer(server);
server.listen(PORT, () => {
console.log(`socket-Server is running on http://localhost:${PORT}`);
});