This project implements a responsive navigation menu with a search functionality that fetches and displays news articles using the NewsAPI.
- Responsive navigation menu that adapts to different screen sizes
- Search functionality with debounce to optimize API calls
- Integration with NewsAPI to fetch and display news articles
- Environment variable support for secure API key management
Before you begin, ensure you have met the following requirements:
- You have installed Node.js and npm
- You have a NewsAPI key. If not, you can get one at https://newsapi.org/
To install the project, follow these steps:
- Clone the repository:
git clone https://github.com/Knoxand/Responsible-Navigation-Menu.git
- Navigate to the project directory:
cd responsible-navigation-menu
- Install the dependencies:
npm install
- Create a
.env
file in the root directory of the project. - Add your NewsAPI key to the
.env
file:API_KEY=your-newsapi-key-here
To use the project, follow these steps:
- Start the development server:
npm run start
- Open your browser and navigate to
http://localhost:9000
To build the project for production, run:
npm run build
This will create a dist
directory with your compiled code.