The Headline Hub is a web application that fetches and displays news from newsapi.org. Users can explore top headlines, country-specific news, and more. The application is designed to provide a seamless and responsive user experience.
- Fetch top headlines from various categories.
- Browse country-specific news.
- Interactive and user-friendly interface.
- Fully responsive design for desktop and mobile devices.
- Frontend: React.js, Tailwind CSS
- Backend: Node.js
- API: NewsAPI (https://newsapi.org)
- HTTP Client: Axios
- Node.js installed on your machine.
- A valid API key from newsapi.org.
-
Clone the repository:
git clone https://github.com/itzharshit99/Headline-Hub.git cd headline-hub
-
Install dependencies:
# Install frontend dependencies cd client npm install # Install backend dependencies cd ../server npm install
-
Set up environment variables:
- Create a
.env
file in theserver
directory and add the following:API_KEY=your_api_key_here PORT=3000
- Create a
-
Start the development servers:
# Start the backend server cd server nodemon server.js # Start the frontend server cd ../client npm run dev
-
Open your browser and navigate to
http://localhost:3000
.
The project integrates with NewsAPI for fetching news data. Axios is used for making HTTP requests.
- Add search functionality to find news by keyword.
- Add user preferences for personalized news feeds.
Contributions, issues, and feature requests are welcome! Feel free to check out the issues page.
This project is licensed under the MIT License.
- newsapi.org for providing the news data.
- Open-source libraries and tools used in this project.
Feel free to reach out with any questions or feedback about this project!