Skip to content

oscargm/weather

Repository files navigation

Weather widgets app

This is just a proof of concept for weather cards to be used as widgets into multiple possible places.

Steps to get it working

Clone and install dependencies

# clone the repository and install dependencies
git clone https://github.com/oscargm/weather.git
cd weather
npm i

API Keys

OpenWeather

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

Mock server

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.

About

Weather widgets written in svelte

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published