This commit is contained in:
2026-01-29 05:49:44 -08:00
parent 6483d6a8fc
commit 0485559832
+17
View File
@@ -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}`);
});