Spaces:
Running
Running
| import express from "express"; | |
| import path from "path"; | |
| import { fileURLToPath } from "url"; | |
| const __dirname = path.dirname(fileURLToPath(import.meta.url)); | |
| const app = express(); | |
| const PORT = 5100; | |
| app.use(express.static(path.join(__dirname, "dist"))); | |
| app.get("*", (req, res) => { | |
| res.sendFile(path.join(__dirname, "dist", "index.html")); | |
| }); | |
| app.listen(PORT, "0.0.0.0", () => { | |
| console.log(`✅ LeaveFlow running at http://localhost:${PORT}/`); | |
| }); | |