Spaces:
Runtime error
Runtime error
File size: 443 Bytes
446494a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import express from "express";
import dotenv from "dotenv";
import { appRoute } from "./index";
import { createServer } from "http";
import { initSocket } from "./utils/socket";
dotenv.config();
const port = process.env.PORT || 4000;
const httpServer = createServer(appRoute);
const io = initSocket(httpServer);
httpServer.listen(port, () => {
console.log(`Server is listening on ${port}`);
});
export { io };
export default httpServer;
|