This is a simple weather application built using HTML, CSS, and JavaScript with Bootstrap. The app fetches weather data from the OpenWeatherMap API using async/await
and the fetch
API. It also utilizes the Axios library for making HTTP requests.
You can see a live demo of the weather app (https://akshitlakhera.github.io/Weather-app/).
- Get real-time weather information for a given location.
- Display the current temperature, weather condition, and a corresponding icon.
- Show additional details such as humidity, wind speed, and visibility.
- User-friendly and responsive design using Bootstrap.
- HTML
- CSS
- JavaScript
- Bootstrap
- OpenWeatherMap API
- Axios
Before running the project on your local machine, ensure that you have the following:
- A modern web browser (Chrome, Firefox, Safari, etc.).
- An internet connection to fetch data from the OpenWeatherMap API.
To run the project on your local machine, follow these steps:
-
Clone the repository to your local machine using the following command: git clone https://github.com/your-username/my-weather-app.git
-
Navigate to the project directory: cd my-weather-app
-
Open the
index.html
file in your preferred web browser.
To make API requests and fetch weather data, you'll need an API key from OpenWeatherMap. Follow these steps to obtain an API key:
-
Go to the OpenWeatherMap website and sign up for a free account.
-
After signing up, go to your account dashboard and locate your API key.
-
Copy the API key and replace the
API_KEY
variable in thescript.js
file with your actual API key.