Auspicious14's picture
Upload 11 files
446494a verified
Raw
History Blame Contribute Delete
443 Bytes
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;