From 0485559832cfdf0182bbc20ac687c185d9849240 Mon Sep 17 00:00:00 2001 From: Chewbaccalakis Date: Thu, 29 Jan 2026 05:49:44 -0800 Subject: [PATCH] idk --- server.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 server.js diff --git a/server.js b/server.js new file mode 100644 index 0000000..c871457 --- /dev/null +++ b/server.js @@ -0,0 +1,17 @@ +import express from "express"; +import path from "path"; + +const app = express(); +const PORT = process.env.PORT || 3000; + +// Serve static files from dist +app.use(express.static(path.join(__dirname, "dist"))); + +// For React Router: always return index.html +app.get("*", (req, res) => { + res.sendFile(path.join(__dirname, "dist", "index.html")); +}); + +app.listen(PORT, () => { + console.log(`Server running at http://localhost:${PORT}`); +});