A modern and responsive news aggregator web app that fetches and displays news articles based on categories and search terms.
🔗 News Aggregator - Live Website
🔗 Backend API - Render
Loading State
Search
- Frontend: React, TypeScript, Styled Components, React Query
- Backend: Node.js, Express, Axios
- Deployment: Render (Backend , Frontend)
- API: NewsAPI.org (for fetching news data)
git clone https://github.com/sogolnaseri/news-aggregator.git
cd news-aggregator
Run this inside both the frontend and backend folders:
npm install### 3️⃣ Set Up Environment Variables
Create a .env file in the backend directory and add:
NEWS_API_KEY=your-newsapi-keyFor the frontend, create a .env file in the root directory and add:
REACT_APP_BACKEND_URL=http://localhost:5001Navigate to the backend folder and start the server:
cd backend
npm startThis will start the backend at http://localhost:5001.
Navigate to the news-aggregator project for frontend and start the React app
npm start| Method | Endpoint | Description |
|---|---|---|
| GET | /api/news?category=technology | Fetch news articles by category |
| GET | /api/news?search=apple | Fetch news articles by search term |
- Hosted on Render.
- Uses Express.js for handling API requests.
- Hosted on Render.
- Built with React + React Query for data fetching.