Files
Dwinzo-Backend-V0.0/src/socket-server/index.ts

23 lines
584 B
TypeScript
Raw Normal View History

2025-01-30 12:44:04 +05:30
import express from "express"
import { Response, Request } from "express";
import http from "http";
import dotenv from "dotenv"; // Import dotenv
dotenv.config();
2025-03-28 12:45:59 +05:30
import { initSocketServer } from "./socket/socketManager.ts";
2025-01-30 12:44:04 +05:30
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}`);
});