Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 1.21 KB

README.md

File metadata and controls

27 lines (22 loc) · 1.21 KB

Weather App

A simple, responsive web application that fetches real-time weather data for any city using the WeatherAPI.

Features

  • Real-time Data: Fetches live temperature, local time, and location details.
  • Asynchronous Logic: Uses async/await to handle API calls without freezing the browser.
  • Error Handling: Gracefully handles invalid city names or network issues.
  • Clean UI: Simple interface for quick weather checks.

Technologies Used

  • HTML5 & CSS3: For the structure and layout.
  • JavaScript (ES6+): For DOM manipulation and logic.
  • Fetch API: Used to communicate with the weather service.
  • Template Literals: Used for dynamic string injection.

How to Run

  1. Clone this repository to your local machine.
  2. Get a free API key from WeatherAPI.com.
  3. Open script.js and replace 'YOUR_API_KEY_HERE' with your actual API key.
  4. Open index.html in your browser.

Learning Highlights

This project was a great way to practice:

  • Working with asynchronous JavaScript and the Fetch API.
  • Understanding the request/response lifecycle between a client and a server.
  • Managing DOM elements and error states in a professional, commented way.