This is a news aggregator project built using the MERN stack (MongoDB, Express, React, Node.js) and the NewsAPI.org API. The project allows users to view news articles from various sources.
These instructions will help you set up the project on your local machine for development and testing purposes.
- Node.js and npm installed on your machine
- A NewsAPI.org API key
- Fork the repository on GitHub.
- Clone the repository to your local machine.
- Navigate to the server directory and create a new file named
.env
. - Add your NewsAPI.org API key to the
.env
file in the following format:API_KEY=your_news_api_key
. - In the server directory, run
npm install
to install the necessary dependencies. - Start the server by running
node server.js
. - Navigate to the client directory and run
npm install
to install the necessary dependencies. - Start the client by running
npm run dev
.
Once the project is set up and running, you can view news articles from various sources on the client side.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.