A simple news aggregator application that fetches and stores RSS feed articles from multiple sources. The application is built using Node.js, Express, SQLite3, and RSS-parser.
- Fetches and aggregates news articles from various RSS feeds.
- Stores the articles in a SQLite database.
- Provides an API to retrieve stored articles.
- Serves a web frontend to display the articles.
- Backend: Node.js, Express, SQLite3
- Frontend: HTML, CSS, JavaScript
- RSS Parsing: RSS-Parser
- Node.js: Download and install Node.js
- Git: Download and install Git
-
Clone this repository:
git clone https://github.com/your-username/anonymous-news-aggregator.git cd anonymous-news-aggregator
-
Install the dependencies:
npm install
-
Ensure you have the
feeds.json
file andnews.db
file:feeds.json
: A JSON file containing RSS feed URLs and their respective names.news.db
: The SQLite database where the articles will be stored (automatically created on the first run if it doesn't exist).
-
Start the server:
node server.js
The server will start on
http://localhost:3000
.
-
Visit the homepage:
Open a web browser and go to http://localhost:3000. -
API:
To get all the articles, make a GET request to the following endpoint:http://localhost:3000/api/articles
This will return a JSON response with the latest 50 articles.
backend/
: Contains server-side logic and database files.server.js
: The main server file with routes and logic for fetching and storing RSS feeds.news.db
: SQLite3 database storing articles.feeds.json
: A JSON file containing RSS feed URLs and source names.
frontend/
: Contains the frontend files (HTML, CSS, JS) served by Express.
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature
). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to RSS-Parser for simplifying RSS feed parsing.
- Thanks to SQLite3 for the lightweight database solution.
### Customization Notes:
- Replace `https://github.com/your-username/anonymous-news-aggregator.git` with the actual GitHub URL of your project.
- You may want to adjust the sections to fit your specific needs, e.g., adding further instructions, setup, or troubleshooting steps.
### How to Use:
1. Create a new file in your project folder called `README.md`.
2. Copy the contents of this template into that file.
3. Push the `README.md` to your GitHub repository.