feat: make flat-stack-presejpacky standalone with Docker and Makefile

This commit is contained in:
2026-06-07 16:48:15 +02:00
parent 164230356c
commit b7e4bbb49d
21 changed files with 5110 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import express from 'express';
import path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const app = express();
const PORT = process.env.PORT || 3000;
// Serve static files from the 'dist' directory
app.use(express.static(path.join(__dirname, 'dist')));
// Fallback to index.html for Single Page Application routing
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname, 'dist', 'index.html'));
});
app.listen(PORT, () => {
console.log(`Server is running on port ${PORT}`);
});