Use Open Weather API to fetch weather and show weather around you.
-
Get weather by your current location and get:
- Current weather fot the next minute.
- Hourly weather forecast for the next 48 hours.
- Daily weather forecase for the next 7 days.
-
Get weather by your desired location and get:
- Current weather fot the next minute.
- Hourly weather forecast for the next 48 hours.
- Daily weather forecase for the next 7 days.
- React JS
- Mantine
- Open Weather API (Onecall API)
- Position Stack Geolocation API
-
Step 1 : Create
.env
file in the root level. -
Step 2 : Get your Open Weather API key and Position Stack Geolocation API key from respective websites (refer references section).
-
Step 3 : Add the following keys and their respective values you have obtained.
REACT_APP_OPEN_WEATHER_URL=https://api.openweathermap.org/data/2.5/onecall REACT_APP_OPEN_WEATHER_KEY=<your-position-open-weather-api> REACT_APP_POSITION_STACK_GEOLOCATION_KEY=<your-position-stack-geolocation-key>
-
Step 4 : Install packages :
npm install
-
Step 5 : Start Project :
-
Get Position Stack Geolocation API key :
https://positionstack.com/
-
Get Open Weather API key :
https://openweathermap.org/api/one-call-api