This project is a simple web application that fetches and displays news articles from the News API. Users can browse news articles by category and search for specific topics of interest.
- Browse news articles by category (e.g., business, technology, entertainment).
- Search for news articles based on keywords.
- Responsive design for desktop and mobile devices.
- JavaScript
- HTML
- CSS
To set up your News App using News API project from your GitHub repository, follow these steps:
-
Open your terminal or command prompt.
-
Clone the repository using the following command:
git clone https://github.com/thegeek36/ULTIMATE-JAVASCRIPT-PROJECT.git
-
Navigate to the specific project directory:
cd ULTIMATE-JAVASCRIPT-PROJECT/Web Scraping and API Projects/3-news_app_using_news_api
-
Once you're in the project directory (
3-news_app_using_news_api
), open theindex.html
file in your preferred web browser. -
If you haven't already, obtain your News API key by following the steps mentioned earlier in the README file (
config.js
setup). -
Create a
config.js
file in the project directory (3-news_app_using_news_api
). -
Add your News API key to
config.js
as shown:const apiKey = 'YOUR_API_KEY_HERE'; export default apiKey;
Replace
'YOUR_API_KEY_HERE'
with your actual News API key. -
Save
config.js
. -
Ensure that
config.js
is added to your.gitignore
file to avoid committing your API key to GitHub.
- Open
index.html
in your browser. - Select a category from the navigation menu to view category-specific news.
- Use the search bar to search for news articles by keywords.
- Make sure your browser supports JavaScript and that you have an active internet connection to fetch news articles from the News API.
- Customize and enhance the project as needed, considering the features and technologies already listed in the project description.
Contributions are welcome! Fork the repository and submit a pull request with your enhancements.