Welcome to AcoNews, a modern and responsive news application that fetches the latest headlines from around the world using the GNews API. This project demonstrates how to build a news app with React, integrate with a news API, and deploy it using Firebase Hosting.
To get a local copy of the project up and running on your machine, follow these instructions:
npm install -g firebase-tools
.Clone the Repository
git clone https://github.com/your-username/aconews.git
cd aconews
Install Dependencies
npm install
Create a .env
File
In the root of your project, create a file named .env
and add your GNews API key:
REACT_APP_GNEWS_API_KEY=your-gnews-api-key
Run the Development Server
npm start
This will start the development server at http://localhost:3000
.
To build the project for production:
npm run build
The output will be in the dist
directory.
Initialize Firebase
firebase init
Follow the prompts to set up Firebase Hosting, selecting your existing project and specifying dist
as your public directory.
Deploy
firebase deploy
This will deploy your app to Firebase Hosting. You’ll get a URL where your app is hosted.
If you’d like to contribute to the project, please follow these steps:
git checkout -b feature/YourFeature
).git commit -am 'Add new feature'
).git push origin feature/YourFeature
).Distributed under the MIT License. See LICENSE
for more information.