Auspicious14's picture
Upload 94 files
77610ec verified
Raw
History Blame Contribute Delete
714 Bytes
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.io = void 0;
const dotenv_1 = __importDefault(require("dotenv"));
const index_1 = require("./index");
const http_1 = require("http");
const socket_1 = require("./utils/socket");
dotenv_1.default.config();
const port = process.env.PORT || 4000;
const httpServer = (0, http_1.createServer)(index_1.appRoute);
const io = (0, socket_1.initSocket)(httpServer);
exports.io = io;
httpServer.listen(port, () => {
console.log(`Server is listening on ${port}`);
});
exports.default = httpServer;