Welcome to WeatherPulse, a powerful and user-friendly weather application that provides real-time weather updates and forecasts. With intuitive features and a sleek design, WeatherPulse offers a seamless experience for staying informed about the current and upcoming weather conditions.
-
Clone the repository:
git clone https://github.com/Prashant-Aher/WeatherPulse.git
-
Install dependencies:
npm install
-
Set up your .env file with API keys and configurations.
-
Run the app:
npm start
-
Sign Up for OpenWeatherMap Account:
Go to https://home.openweathermap.org/users/sign_up and create your own account.
-
Navigate to API Section:
After creating your account, navigate to the API section on the Navigation bar.
-
Explore API Endpoints:
In the API section, explore different options such as Current Weather Data, Hourly 4 hour forecasts, 16 day forecasts, etc. These are the API endpoints you'll use to fetch weather data.
-
Get API Key:
To access the APIs, you need an API key. Click on your username in the top right corner and then select "my API keys."
-
Create API Key if Necessary:
If you don't have an API key, create one. This key will be used to authenticate your requests to the OpenWeatherMap API.
-
Create .env File:
In your main app folder, create a file called .env. This file will store your environment variables, including API endpoints and keys.
-
Define Environment Variables:
Inside the .env file, set up the following environment variables:
REACT_APP_API_URL = 'https://api.openweathermap.org/data/2.5'
REACT_APP_API_KEY = [Paste your API key here]
REACT_APP_ICON_URL = 'https://openweathermap.org/img/w'
-
Paste API Key:
Replace
[Paste your API key here]
in theREACT_APP_API_KEY
variable with the API key you obtained from OpenWeatherMap. This step ensures your application can authenticate and access weather data.