2024-08-21 01:25:49 -04:00
|
|
|
import { PostListener } from "./routes";
|
|
|
|
import express from "express";
|
2024-08-16 15:04:52 -04:00
|
|
|
import dotenv from "dotenv";
|
2024-08-21 01:25:49 -04:00
|
|
|
import { Logger } from "./utils";
|
2024-08-16 15:04:52 -04:00
|
|
|
dotenv.config();
|
|
|
|
|
2024-08-21 01:25:49 -04:00
|
|
|
const app = express();
|
|
|
|
const post = new PostListener(app);
|
|
|
|
const logger = new Logger("Main");
|
2024-08-16 15:04:52 -04:00
|
|
|
|
2024-08-21 01:25:49 -04:00
|
|
|
const port = +process.env.PORT || 8080;
|
2024-08-16 15:04:52 -04:00
|
|
|
|
2024-08-21 01:25:49 -04:00
|
|
|
post.start();
|
2024-08-16 15:04:52 -04:00
|
|
|
|
2024-08-21 01:25:49 -04:00
|
|
|
app.listen(port, () => {
|
|
|
|
logger.log(`Server started on http://localhost:${port}`);
|
|
|
|
});
|