2025-05-28 10:02:16 +05:30
|
|
|
import express,{ Response, Request } from "express";
|
2025-01-30 12:44:04 +05:30
|
|
|
import http from "http";
|
2025-05-28 09:42:00 +05:30
|
|
|
import dotenv from "dotenv";
|
2025-01-30 12:44:04 +05:30
|
|
|
|
|
|
|
|
dotenv.config();
|
|
|
|
|
|
2025-05-14 18:47:04 +05:30
|
|
|
import { SocketServer } from "./manager/manager.ts";
|
2025-01-30 12:44:04 +05:30
|
|
|
const app = express();
|
|
|
|
|
const PORT = process.env.SOCKET_PORT;
|
|
|
|
|
const server = http.createServer(app);
|
|
|
|
|
|
2025-05-28 09:42:00 +05:30
|
|
|
app.get("/", (req: Request, res: Response) => {
|
|
|
|
|
res.send("Hello, I am Major-Dwinzo RealTime!");
|
2025-01-30 12:44:04 +05:30
|
|
|
});
|
2025-06-02 09:47:33 +05:30
|
|
|
SocketServer(server)
|
2025-01-30 12:44:04 +05:30
|
|
|
server.listen(PORT, () => {
|
|
|
|
|
console.log(`socket-Server is running on http://localhost:${PORT}`);
|
|
|
|
|
});
|