This project is a simple weather app that allows users to search for weather information based on a city name. The app fetches data from the OpenWeatherMap API and displays the current temperature, humidity, and wind speed. Additionally, it shows a weather icon corresponding to the current weather conditions.
- Search for weather by city name.
- Displays the current temperature, humidity, and wind speed.
- Shows weather-related icons (e.g., rain, clouds, clear sky).
- Handles invalid city names gracefully by displaying an error message.
- HTML: Structure of the weather app.
- CSS: Styling of the app.
- JavaScript: Fetching data from the OpenWeatherMap API and handling the user interactions.
- OpenWeatherMap API: Provides the weather data.
Follow these steps to run the weather app on your local machine:
git clone https://github.com/evitabarboza/weather-app.gitcd weather-appYou can simply open the index.html file using any modern browser (e.g., Chrome, Firefox, Edge).
To use the OpenWeatherMap API, you'll need to sign up for an API key.
- Go to OpenWeatherMap and create an account.
- Once logged in, navigate to your API keys.
- Copy your API key and replace it in the JavaScript file:
const apiKey = "YOUR_API_KEY";
- Make sure to replace
"YOUR_API_KEY"in the script with your actual API key for it to work!
/weather-app
│
├── index.html # Main HTML file
├── styles.css # Styling for the app
├── script.js # JavaScript file for handling logic
├── images/ # Folder containing weather icons (rain.png, clear.png, etc.)
│
└── README.md # Project documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- GitHub: evitabarboza
- Email: [email protected]