Skip to content

Latest commit

 

History

History
39 lines (24 loc) · 876 Bytes

File metadata and controls

39 lines (24 loc) · 876 Bytes

weatherapp

A simple weather app built with React. Search a city and it shows the current temperature, humidity, wind speed, and a matching weather icon. Data comes from the OpenWeatherMap API.

Bootstrapped with Create React App.

Setup

npm install

You'll need an API key from OpenWeatherMap. Put it in a .env file at the project root:

REACT_APP_WEATHER_API_KEY=your_key_here

Then update src/Components/weatherapp/WeatherApp.jsx to read it from process.env.REACT_APP_WEATHER_API_KEY instead of the hardcoded value.

Running

npm start

Opens at http://localhost:3000.

Build

npm run build

Outputs a production build to build/.

Notes

Temperature is shown in Fahrenheit and wind speed in mph (the API call uses units=imperial). Change that in the fetch URL if you want metric.