import express from 'express'; import path from 'path'; import { fileURLToPath } from 'url'; 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 || 8080; app.get('/health', (_req, res) => { res.json({ status: 'ok' }); }); app.use(express.static(path.join(__dirname, 'public'))); app.get('*', (_req, res) => { res.sendFile(path.join(__dirname, 'public', 'index.html')); }); app.listen(port, () => { console.log(`BlackRoad OS placeholder server listening on port ${port}`); const PORT = process.env.PORT || 8080; app.use(express.static(path.join(__dirname, "public"))); app.get("/health", (_req, res) => { res.json({ ok: true, service: "blackroad-operating-system", status: "healthy" }); }); app.get("*", (_req, res) => { res.sendFile(path.join(__dirname, "public", "index.html")); }); app.listen(PORT, () => { console.log(`BlackRoad OS app listening on port ${PORT}`); });