A simple web application to display the current weather information for any city using the WeatherAPI.
- Search weather details for any city worldwide.
- Displays:
- City Name (including region and country)
- Temperature (in °C)
- Last Updated Time
- Humidity
- Feels Like Temperature (in °C)
- Precipitation (in mm)
- Wind Speed (in km/hr)
- Current Weather Conditions
- HTML, CSS, JavaScript: For building the frontend.
- WeatherAPI: For fetching live weather data.
- RapidAPI: To access the WeatherAPI service.
- A valid API key from RapidAPI's WeatherAPI.
-
Clone the repository:
git clone <repository_url> cd <project_directory>
-
Open the
index.htmlfile in a web browser to run the app. -
Replace the API key in the
fetchWeatherfunction if needed:'x-rapidapi-key': '<your_api_key>'
-
Search for a city using the input field provided on the webpage.
- Open the application in your browser.
- Enter the name of the city in the input field.
- Click on the "Search" button.
- The app will display the weather details for the entered city.
- Input:
New York - Output:
- City Name: New York, New York, United States
- Temperature: 15°C
- Last Updated: 2024-11-27 10:00 AM
- Humidity: 60%
- Feels Like: 14°C
- Precipitation: 2.5mm
- Wind Speed: 10 km/hr
- Conditions: Cloudy
- Add support for fetching a 7-day weather forecast.
- Include temperature units toggle (°C/°F).
- Enhance the UI for better user experience.
Subhajit Roy
A second-year CSE student and aspiring backend developer. Enthusiastically exploring tech domains and teaching concepts!
If you like this project, consider ⭐ starring the repository! 😊