Skip to content

Instantly share code, notes, and snippets.

@satansdeer
Created Aug 8, 2018
Embed
What would you like to do?
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