Welcome to the Weather App, a web application that allows users to check the current weather for a location by making asynchronous requests to a weather API. This app displays weather data in a user-friendly format and handles error cases gracefully.
The project is organized as follows:
Directory weather-app/ |-- index.html |-- styles.css |-- app.js |-- README.md |-- sun.jpg
To use the Weather App, follow these steps:
-
Clone or download this project from the repository.
-
Open the
index.html
file in a web browser. -
Enter a location (e.g., city or ZIP code) in the input field.
-
Choose the temperature unit (Celsius or Fahrenheit) from the dropdown.
-
Click the "Get Weather" button to fetch and display the current weather conditions for the specified location.
-
Optionally, you can click the "Use My Location" button (if implemented) to fetch weather data for your current location based on geolocation.
-
Weather Display: Get the current weather conditions, including temperature, humidity, wind speed, and weather description.
-
Error Handling: User-friendly error messages are displayed if the location is not found or if there's an issue with the API request.
-
Temperature Units: Toggle between Celsius and Fahrenheit to view temperature in your preferred unit.
-
Background Image: The app uses a background image with a glass effect for a visually appealing design.
- You can customize the app's appearance by modifying the CSS in the
styles.css
file.
Replace 'YOUR_API_KEY'
in the app.js
file with your actual API key from a weather API provider (e.g., OpenWeatherMap).
Thoroughly test the app on different devices and browsers to ensure it functions correctly.
Deploy the application to a web server or hosting service of your choice to make it accessible online.
- Keep your API key secure and do not share it publicly.
This Weather App was created by [KARTIK RAMESH CHAVAN].