import "dotenv/config";
import express from "express";
import { createServer } from "http";
import router from "routes/router";
import cors from "cors";

const app = express();
const server = createServer(app);

app.use(cors());
app.use(express.json());
app.use(router);

server.listen(process.env.DISCORD_SERVER_PORT, () => {
	console.log(`Server running on port ${process.env.DISCORD_SERVER_PORT}`);
});
