Project for TheOdinProject JavaScript curriculum.
The user can search for a location by city name and fetch the location's current weather data using OpenWeatherMap API.
- Fetch and display weather data from any city in the world.
- Display 5-day daily forecast data.
- Display data in metric or imperial units.
- Unique icons and colors for each weather.
Possible future features:
- Display current time and date for the location searched.
- Display user's location when first loading the page.
- OpenWeatherMap API
- Weather icons by Erik Flowers: (https://erikflowers.github.io/weather-icons/)
- date-fns Module
- Webpack
Live version here
To use the website, click here.
To use the code, download all files and put them in the same directory. Inside the /src
directory, inside the api-key.js
, write your own API key on the designated place. You can generate an API key on the OpenWeatherMap website.
On the terminal, on the directory the files were downloaded to, install Webpack and date-fns by running npm install webpack webpack-cli --save-dev
and npm install date-fns --save
.
Run Webpack to create the paths and the bundle by running npm run build
.