A weather application built with React and CSS, using the OpenWeather API to fetch weather data. This app allows users to retrieve weather information for a specific city or their current location.
https://weatherappbgaurav.netlify.app/
To run the app locally, follow these steps:
- Clone the repository or download the source code.
- Navigate to the project directory in your terminal.
- Install the dependencies by running the following comma
- Clone the project
git clone https://github.com/Gauravrandheer/Weather_App.git
- Create a .env file in the project root directory and add your OpenWeather API key as VITE_API_KEY:
VITE_API_KEY=your_api_key_here
- Install dependencies
npm install
- Start the development server with the following command:
npm run dev
- Open your web browser and visit http://localhost:3000 to access the Weather App.
-
Input City Name: In the provided input field, enter the name of the city for which you want to fetch weather data. Press Enter, and the app will display the corresponding weather information.
-
Get Your Location: Click on the "Get Device Location" button to retrieve weather data for your current location. Make sure you have granted the app permission to access your device's location.