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