I have a website built with Angular (version 12) using the Angular CLI, and I am looking to generate an RSS feed. Instead of serving HTML content, I want the application to output RSS XML for a specific route like /rss
.
While I plan on utilizing the rss package from npm to create the content of the feed, I am unsure about the process of redirecting the response to output RSS instead of HTML. Most online resources discuss reading RSS feeds in Angular rather than serving them, leading me to question my approach.
Although some solutions suggest writing a file to the server, I am hesitant as it seems inefficient. I recall achieving something similar in the past with ASP.NET and believe it should be feasible with Angular, but my attempts have not been successful thus far.