diff --git a/index.js b/index.js index df0f6cd..f35ee7e 100644 --- a/index.js +++ b/index.js @@ -150,9 +150,9 @@ function getMetar(icao) { * @returns {RSS} RSS Feed with populated items */ function generateFeed(service, icao, items, outputPath) { - let feedURL = rssBaseURL; - feedURL.pathname = feedURL.pathname.concat(outputPath); - + let feedURL = new URL(rssBaseURL); + feedURL.pathname = path.join(feedURL.pathname, outputPath, "rss.xml"); + let feedOptions = { title: icao + " " + service, description: service + " feed for " + icao + " Airport",