A simple weather application built using React JS and the OpenWeather API. Users can see the current weather based on their current location or by entering a location of their choice.
- Display current weather for the user's location using geolocation.
- Allow users to search for weather in any city by entering the location.
- Show weather details including temperature, humidity, wind speed, and weather conditions.
- Responsive design for use on both desktop and mobile devices.
https://weather-5qgduu5vv-harsh1519s-projects.vercel.app/
-
Clone the repository:
git clone https://github.com/harsh1519/Weather_app.git cd weather-app -
Install dependencies:
npm install
-
Obtain an API key from OpenWeather and add it to your
.envfile:REACT_APP_WEATHER_API_KEY=your_api_key_here
-
Start the development server:
npm start
-
Open your browser and navigate to
http://localhost:3000.
-
Current Location Weather:
- When the application loads, it will prompt the user for permission to access their location.
- If the user grants permission, the app will display the current weather for their location.
-
Search Weather by Location:
- Users can enter a city name in the search bar and click the search button.
- The app will display the weather information for the entered cit