This Weather Application is a simple web application built with React that allows users to fetch and display weather information based on city names using the OpenWeatherMap API.
Before running the application locally, make sure you have the following installed:
- Node.js
- npm (Node Package Manager)
To run the application locally, follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/HamzaRasheed26/React-Weather-App.git
-
Navigate to the project directory:
cd weather-application
-
Install dependencies:
npm install
-
Create a
.env
file in the root directory of the project and add your OpenWeatherMap API key:REACT_APP_WEATHER_API=your-api-key
(Replace your-api-key
with your actual API key obtained from OpenWeatherMap)
-
Start the development server:
npm start
-
Open your web browser and visit http://localhost:3000 to view the application.
- Enter the name of a city in the input field.
- Click the "Submit" button to fetch and display weather information for the entered city.
- React
- JavaScript
- HTML/CSS
- OpenWeatherMap API
Contributions are welcome! If you find any bugs or have suggestions for improvement, please submit an issue or create a pull request.