diff --git a/.env b/.env index 6875bff..dc3925a 100644 --- a/.env +++ b/.env @@ -10,7 +10,7 @@ DISCORD_CHANNEL_ID=600347996080701506 PORT=8000 # Base URL for RSS feed links (optional) -BASE_URL=http://localhost:8000 +BASE_URL=rss.hacecalor.net # Fetch interval in milliseconds (optional, defaults to 5 minutes) FETCH_INTERVAL_MS=300000 diff --git a/data/messages.db b/data/messages.db index 182c97c..07c15d0 100644 Binary files a/data/messages.db and b/data/messages.db differ diff --git a/src/index.js b/src/index.js index 360a7f8..fa2391f 100644 --- a/src/index.js +++ b/src/index.js @@ -22,7 +22,7 @@ if (!fs.existsSync(dataDir)) { await initDatabase(); const app = express(); -const PORT = process.env.PORT || 3000; +const PORT = process.env.PORT || 8000; // Middleware app.use(express.json()); @@ -76,9 +76,9 @@ async function start() { await fetchChannelMessages(process.env.DISCORD_CHANNEL_ID, 100); // Start HTTP server - app.listen(PORT, () => { - console.log(`RSS server running on http://localhost:${PORT}`); - console.log(`RSS feed available at: http://localhost:${PORT}/rss/${process.env.DISCORD_CHANNEL_ID}`); + app.listen(PORT, '0.0.0.0', () => { + console.log(`RSS server running on http://0.0.0.0:${PORT}`); + console.log(`RSS feed available at: http://:${PORT}/rss/`); }); // Periodic fetch (every 5 minutes)