Skip to content

Instantly share code, notes, and snippets.

@satansdeer
Created August 8, 2018 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save satansdeer/cb146c0084847cd50b2231ba675aa8c0 to your computer and use it in GitHub Desktop.
Save satansdeer/cb146c0084847cd50b2231ba675aa8c0 to your computer and use it in GitHub Desktop.
export const getWeatherForLocation = city => {
const [lat, long] = city["latt_long"].split(",");
return fetch(
`https://darksky-wrapper.herokuapp.com/forecast/${lat},${long}`,
{
mode: "cors"
}
).then(res => res.json());
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment