This is just a proof of concept for weather cards to be used as widgets into multiple possible places.
# clone the repository and install dependencies
git clone https://github.com/oscargm/weather.git
cd weather
npm i
Go to OpenWeather and create an account.
Create an api key and copy into the example.env file as WEATHER_API_KEY
Then you can start the application
npm run dev
A mock server has been installed to prevent api blocks per maximum requests. To use the mock server, run in another terminal instance the following code:
npm run mock-server
and change the url of the fetch method in App.svelte to http://localhost:3000/weather
then, you'll have unlimited requests to continue developing.
This will return a weather sample response for Barcelona city, feel free to change as you please.