Skip to content

Instantly share code, notes, and snippets.

@sgnl
Last active June 29, 2018 16:02
Show Gist options
  • Save sgnl/bba0abc3f3ef925dfc38 to your computer and use it in GitHub Desktop.
Save sgnl/bba0abc3f3ef925dfc38 to your computer and use it in GitHub Desktop.
5-day forecast

Sign up for an APPID (APIKEY)

  1. Sign up for an account to get your API KEY http://openweathermap.org/API
  2. Read the Documentation for getting a 5-Day weather forecast

Project Set-up

Your project directory should look like:

public
├── css
│  └── styles.css
├── index.html
└── js
    ├── client.js
    └── open_weather.js (this is for the stretch goal of making a module)

notes: css, index.html and js directories are all siblings and located inside of public/ of your project.

Goal (MVP)

There should be an input field where the User is able to input a city's name. Once the city name has been entered, there should be a button to trigger the XHR request to get a 5-day weather forecast data from OpenWeather. Display the data the best you can.

you must vanilla javascript xhr.

use git, commit often!

Resources

http://slides.com/sgnl/xhr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment