Skip to content

Commit

Permalink
Deployed api url
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeetii committed Oct 6, 2024
1 parent 2ecf46f commit 1da7425
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/src/lib/components/Map.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import { getContext, onMount } from 'svelte';
import '../../global.css';
import type { Feature, GeoJsonProperties, Geometry } from 'geojson';
import { dev } from '$app/environment';
let mapStore: MapStore = getContext(MAPSTORE_CONTEXT_KEY);
Expand Down Expand Up @@ -44,8 +45,9 @@
}
function addWebcamsToMap(map: maplibregl.Map) {
fetch("http://localhost:8080/listFiles")
function addWebcamsToMap(map: maplibregl.Map) {
const url = dev ? "http://localhost:8080/listFiles" : "https://live-weather-461142450582.europe-north1.run.app//listFiles";
fetch(url)
.then((response) => response.json())
.then((data: Webcam[]) => {
data.forEach((webcam) => {
Expand Down

0 comments on commit 1da7425

Please sign in to comment.