2024-04-23 08:49:57 -05:00
|
|
|
import express from "express";
|
2024-06-06 00:48:41 -05:00
|
|
|
import compression from "compression";
|
|
|
|
|
2024-04-23 08:49:57 -05:00
|
|
|
import { fileURLToPath } from "url";
|
|
|
|
import path from "path";
|
|
|
|
|
|
|
|
const app = express();
|
2024-05-09 06:17:12 -05:00
|
|
|
const port = 3000;
|
2024-04-23 08:49:57 -05:00
|
|
|
|
2024-06-06 00:48:41 -05:00
|
|
|
app.use(compression());
|
|
|
|
|
2024-04-23 08:49:57 -05:00
|
|
|
const staticPath = path.join(fileURLToPath(import.meta.url), "../../resources/public");
|
|
|
|
app.use(express.static(staticPath));
|
|
|
|
|
|
|
|
app.listen(port, () => {
|
|
|
|
console.log(`Listening at 0.0.0.0:${port}`);
|
|
|
|
});
|