From 37108217d8f234ae9462cf8b0a5dd95042293938 Mon Sep 17 00:00:00 2001 From: Ryan Mwangi Date: Tue, 8 Oct 2024 22:22:35 +0300 Subject: [PATCH] use a fixed URL for the merged calendar --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index c41a372..45ca2d3 100644 --- a/server.js +++ b/server.js @@ -172,7 +172,7 @@ END:VEVENT fs.writeFileSync(filename, icalString); // Generate a unique URL for the merged calendar - const mergedCalendarUrl = `${req.protocol}://${req.get('host')}/${filename}`; + const mergedCalendarUrl = `http://localhost:3000/${filename}`; // Store the merged calendar URL in a file fs.writeFileSync(mergedCalendarUrlFile, mergedCalendarUrl); @@ -197,7 +197,7 @@ app.get('/merged-calendar', (req, res) => { const mergedCalendarUrl = fs.readFileSync(mergedCalendarUrlFile, 'utf8'); res.redirect(mergedCalendarUrl); }); - + // Start the server const port = 3000; app.listen(port, () => {