weather-app

Weather App

Weather App in Svelte that calls and handles a RESTful API

Weather App

Weather App in Svelte that calls and handles a RESTful API. Allows you to add a card per city.

Install

To install the necessary dependencies, run the following commands:

npm install
npm run build

Afterwards, create a .env file in this directory with the following notation, changing 'YOUR_API_KEY' with your own key:

SECRET_API_KEY=your_api_key

You can get one for free at https://www.weatherapi.com/

Preview

To preview this application, first clone the project and then simply run the following command:

npm run preview

Deploying

In order to deploy it, you can either set the host and port in build/index.js and run:

node build

or set the the host and port when running the command itself:

HOST=127.0.0.1 PORT=4000 node build # example

For more information on deploying using SvelteKit using a Node server, check out this link.

Top categories

Loading Svelte Themes