A simple web application that fetches and displays the latest news headlines using NewsAPI.
- Real-time news fetching
- Responsive design
- Search functionality
- Node.js
- Express.js
- JavaScript
- HTML & CSS
- NewsAPI
-
Clone the repository:
git clone https://github.com/yourusername/news-app.git cd news-app -
Install dependencies:
npm install -
Set up environment variables:
- Create a
.envfile in the project root - Add your NewsAPI key:
NEWS_API_KEY=your_news_api_key_here
- Create a
npm start
- Open
http://localhost:3000in your browser.
- Uses NewsAPI Top Headlines Endpoint
- Fetches US news by default
- Fork the repository
- Create a new branch (
git checkout -b feature-name) - Commit changes (
git commit -m 'Add feature') - Push to branch (
git push origin feature-name) - Open a Pull Request
Project Link: https://github.com/kumaradarsh2/news-app