This is the back-end for RSS Reader built with NestJS.
What's an RSS Reader?
RSS stands for Really Simple Syndication, and it is a simple, standardized content distribution method that can help you stay up-to-date with your favourite newscasts, blogs, websites, and social media channels. Instead of visiting sites to find new posts or subscribing to sites to receive notifications of new posts, find the RSS feed on a website and read new posts in an RSS reader.
- Clone the repo
git clone https://github.com/RtiM0/rss-reader-api.git
- Install npm modules
cd rss-reader-api npm install
- Set the database config in
src/app.module.ts - Start the API using NPM script
npm run start
- API will start on
localhost:3001(port can be changed fromsrc/main.tsfile).
All endpoints have a unified response format.
{
message: any,
error: boolean
}GET /feed- Returns all the feeds stored in the database.
POST /feed- To subscribe to new feeds.
- Tries to detect rss feeds from website urls (for eg: https://theverge.com -> https://www.theverge.com/rss/index.xml).
- Saves favicon of the feed.
- Fetches the latest RSS Feed for it.
GET /feed/:id- Returns the articles for the specified feed.
- Supports pagination with
pageandsizequeries.
GET /feed/refresh- Refreshes all feeds.
GET /feed/:id/refresh- Refreshes the specified feed.
External Libraries are only used if they are light-weight, have strong support and that they fully justify their purpose and provide no other unnecessary functions. The libraries used in this project are:
- ggkovacs/rss-finder - To find and verify RSS Feeds.
- rbren/rss-parser - To parse the feeds and efficiently extract data.