This is a simple Weather App built with Next.js that allows users to check the current weather conditions for a specific location by providing latitude and longitude coordinates.
- Fetches weather data from a Weather API.
- Displays current weather information, including temperature, weather conditions, and more.
- Handles error messages gracefully.
- Easy-to-use custom React hook for fetching weather data.
These instructions will help you set up and run the Weather App on your local machine.
Before you begin, make sure you have the following software installed:
-
Clone the repository to your local machine:
git clone https://github.com/kunaalgaur/weather.git
-
Navigate to the project directory:
cd weather-app
-
Install project dependencies:
If you're using npm:
npm install
If you're using Yarn:
yarn install
To configure the Weather App, you'll need to set up environment variables for the Weather API. Create a .env.local
file in the project root and define the following variables:
NEXT_PUBLIC_WEATHER_API=https://api.weatherapi.com/v1
NEXT_PUBLIC_WEATHER_API_KEY=your_weather_api_key_here
Replace your_weather_api_key_here
with your actual Weather API key.
To start the development server, run the following command:
npm run dev
The Weather App will be available at http://localhost:3000.
You can customize this Weather App to fit your specific requirements by modifying the components and styles in the project.
- Next.js - The React framework for building web applications.
- Axios - For making HTTP requests.
- React Hot Toast - For displaying toast notifications.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to Weather API Provider for providing the weather data.