This project is a simple web-based weather application that fetches and displays current weather data for a city using the OpenWeatherMap API. Users can search for any city and get real-time weather information, including temperature, humidity, wind speed, and weather conditions (such as clear, cloudy, rainy, etc.).
- Displays current temperature, humidity, and wind speed for a city.
- Weather icon updates based on the current weather conditions (e.g., clear, rain, clouds, etc.).
- Responsive user interface with search functionality.
Include screenshots or gifs of your project in action (if available).
- HTML5: Structure of the app.
- CSS3: Styling for the UI.
- JavaScript (ES6): Logic and API requests.
- OpenWeatherMap API: Provides real-time weather data.
-
Clone the repository:
git clone https://github.com/gaurav19060/Weather-App.git
-
Navigate to the project directory:
cd Weather-App
-
Install Dependencies: There are no external dependencies required for this project.
-
Run the project: You can open
index.html
directly in your browser or use a simple HTTP server (like Python’shttp.server
) to run it locally:python -m http.server
Open your browser and go to
http://localhost:8000/
.
This app uses the OpenWeatherMap API. To get your own API key:
-
Sign up at OpenWeatherMap to get your API key.
-
Create a
config.js
file in the project directory to store your API key:const apikey = "YOUR_API_KEY_HERE"; export { apikey };
-
Make sure your
.gitignore
includesconfig.js
to keep your API key private:config.js
- Fork the repository.
- Create your feature branch:
git checkout -b feature/my-feature
. - Commit your changes:
git commit -m 'Add some feature'
. - Push to the branch:
git push origin feature/my-feature
. - Open a pull request.