Welcome to the Weather App! This application provides current weather information for any city using data from the OpenWeatherMap API. The app is built with HTML, CSS, and JavaScript, offering a clean and user-friendly interface to help you stay updated with the latest weather conditions.
- Search weather by city name
- Display current temperature, weather description, humidity, and wind speed
- Dynamic background based on weather conditions
Before you begin, ensure you have the following installed:
- A modern web browser (Chrome, Firefox, Safari, etc.)
- Internet connection to fetch data from OpenWeatherMap API
-
Clone the repository:
git clone https://github.com/erinhdsilva/weather-app.git
-
Navigate to the project directory:
cd weather-app -
Open
index.htmlin your web browser: You can double-click on theindex.htmlfile, or you can serve the files using a local server for better development experience.
-
Get your API key from OpenWeatherMap:
- Sign up at OpenWeatherMap.
- Go to the API keys section and generate a new key.
-
Set up your API key:
- Open
app.jsand find the following line:const apiKey = 'YOUR_API_KEY_HERE';
- Replace
'YOUR_API_KEY_HERE'with your actual API key.
- Open
-
Search for a city:
- Enter the name of the city in the search input box.
- Press the "Search" button or hit "Enter" to fetch the weather data.
-
View weather details:
- The app will display the current temperature, weather description, humidity, and wind speed for the searched city.
- Background image will change according to the weather condition.
- OpenWeatherMap API for providing the weather data
- Inspiration from various weather apps and open-source projects
For any questions or feedback, please contact erinhdsilva@gmail.com.
Enjoy using the Weather App and stay updated with the latest weather conditions!