Initial: FOLX live landing page

This commit is contained in:
Sebastjan
2026-04-24 15:35:38 +02:00
commit 5d8fe81e5f
17 changed files with 1155 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
const path = require('path');
const express = require('express');
const app = express();
const PORT = process.env.PORT || 3000;
const STREAM_URL = process.env.HLS_URL || 'https://folxplay.b-cdn.net/live/stream1_master.m3u8';
app.set('view engine', 'ejs');
app.set('views', path.join(__dirname, '..', 'views'));
app.use(express.static(path.join(__dirname, '..', 'public'), {
maxAge: '1h',
etag: true,
}));
app.get('/', (_req, res) => {
res.render('index', { hlsUrl: STREAM_URL });
});
app.get('/api/health', (_req, res) => {
res.json({ ok: true, hls: STREAM_URL, ts: Date.now() });
});
app.listen(PORT, () => {
console.log(`[folx-live] listening on :${PORT}`);
console.log(`[folx-live] HLS source: ${STREAM_URL}`);
});