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

22 lines
566 B
TypeScript
Raw Normal View History

import express from "express";
2025-01-30 12:44:04 +05:30
import { Response, Request } from "express";
import http from "http";
import dotenv from "dotenv";
2025-01-30 12:44:04 +05:30
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!");
2025-01-30 12:44:04 +05:30
});
initSocketServer(server);
server.listen(PORT, () => {
console.log(`socket-Server is running on http://localhost:${PORT}`);
});