import express from "express";
import path from "path";
import cors from 'cors';

const app = express();
const PORT = 8080;

// Serve static files from ../front-end/dist
const staticDir = path.join(__dirname, "../front-end/dist");

app.use(
  express.static(staticDir)
);

app.get("/api/about", (_, res) => {
  res.json({ version: "9.99.9" });
});

app.listen(PORT, () => {
  console.log(`Server is running on http://localhost:${PORT}`);
});