A simple weather application that allows users to search for current weather conditions by entering a location. The application retrieves weather data using the OpenWeather API and displays relevant information, including temperature, weather description, humidity, and wind speed.
- Search for weather information by location.
- Displays:
- Temperature (in Celsius)
- Weather conditions (e.g., Clear, Rain, Snow, etc.)
- Humidity percentage
- Wind speed in Km/h
- View detailed API response data in the browser's developer console
-
Clone the repository:
git clone https://github.com/a0908512313/weather-app.git
-
Navigate to the project directory:
cd weather-app
- Enter a location (e.g., "Chiayi") in the search box.
- Click the search button or press
Enter. - View the weather information or error message if the location is invalid.
- To view the complete weather data:
- Press
F12or open the Developer Tools - Select the "Console" tab
- The full API response data will be displayed in the console when you search for a location
- Press
This app uses the OpenWeather API and Google API. Replace the placeholder API key in the index.js file with your own API key:
const APIKey = "your_openweather_api_key_here";
// line 79 (in fetchWeatherData funtion)
const api = "your_google_api_key_here";
// line 52 (in translate function)You can get a free API key by signing up at OpenWeather and Google cloud console.
Feel free to contribute by submitting issues or pull requests!

