const express = require('express'); const path = require('path'); const app = express(); const port = process.env.PORT || 8902; // Serve static assets from public/ with no caching so edits are always live app.use(express.static(path.join(__dirname, 'public'), { etag: false, lastModified: false, setHeaders: (res) => { res.setHeader('Cache-Control', 'no-store'); } })); app.get('*', (req, res) => { res.sendFile(path.join(__dirname, 'public', 'index.html')); }); app.listen(port, () => { console.log(`[Monitor Server] Web dashboard running on http://localhost:${port}`); });