Skip to content

RaviSingh733/WeatherApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather App

This is a simple weather application built with HTML, CSS, and JavaScript. It allows users to check the current weather conditions based on their location or search for weather by entering the name of a city.

project-image

🚀 Live Demo

https://weathheraapp.netlify.app/

Features

  • View current weather conditions, including temperature, humidity, and wind speed.
  • Get weather data for any city by entering its name.
  • Responsive design, works on mobile and desktop devices.

Technologies Used

  • HTML: Provides the structure of the app.
  • CSS: Styles the app and ensures it's responsive.
  • JavaScript: Handles API requests to fetch weather data, dynamically updates the user interface, and processes user input.
  • OpenWeatherMap API: Provides the weather data (free API key required).

Setup Instructions

1. Clone the Repository

To get started with this project, you can clone the repository:

git clone https://github.com/RaviSingh733/WeatherApp.git
cd WeatherApp

Get an OpenWeatherMap API Key

  • Sign up on OpenWeatherMap and get your free API key.
  • Once you have the key, replace YOUR_API_KEY in the script.js file with your actual API key:
  • const apiKey = 'YOUR_API_KEY'; // Replace with your OpenWeatherMap API key

Open the App Locally

  • After cloning the repo, open the index.html file in your browser.
  • This will launch the weather app locally, and you can start searching for cities to view the weather.
  • Alternatively, you can deploy the app on GitHub Pages (or another hosting platform) by following the instructions below.

How to Deploy on GitHub Pages

  • Push the project to your GitHub repository if you haven't already.
  • Navigate to the repository settings.
  • Scroll down to the "GitHub Pages" section.
  • Under "Source", select the branch you want to deploy (usually main or master).
  • After a few minutes, your weather app will be available at https://github.com/RaviSingh733/WeatherApp.git

How the App Works

  • User Input: The user enters a city name into the input field.
  • API Request: Upon submitting, the JavaScript fetch() function sends a request to the OpenWeatherMap API with the city name and the API key.
  • Weather Data: The API returns the current weather data (e.g., temperature, humidity, wind speed), which is then displayed on the page.
  • Error Handling: If the city is not found, the user will see an error message.

License

  • This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • OpenWeatherMap API for providing the weather data.
  • FontAwesome for the icons used in the app.

Enjoy using the Weather App! 🌞❄️🌧️

Key Sections in the README:

  1. Project Title: The title of the project appears at the top.
  2. Live Demo: Optionally, you can provide a live link to the deployed app if you’ve published it on GitHub Pages or another hosting platform.
  3. Features: A brief overview of the app's functionality.
  4. Technologies Used: Highlights the key technologies involved in the project.
  5. Setup Instructions: Step-by-step guidance on how to set up the project locally, get an API key, and run the app.
  6. Deployment on GitHub Pages: Instructions on how to deploy the app using GitHub Pages.
  7. Folder Structure: A simple directory structure of the project to show the layout of the files.
  8. How the App Works: A description of the app's flow and functionality.
  9. Screenshots: Optional, but recommended for showcasing the look of the app.
  10. License: If you're sharing this as an open-source project, mention the license (MIT is a popular choice).
  11. Acknowledgments: Credits for any libraries, APIs, or tools you’ve used.

This format will help others easily understand your project, how to use it, and how to contribute or deploy it. Make sure to replace placeholder links like https://github.com/RaviSingh733/WeatherApp.git with your actual URLs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published