Refactor with (untracked) config + entry page

This commit is contained in:
2024-11-18 16:17:29 +01:00
parent 59204a591f
commit 6ca602e04d
7 changed files with 83 additions and 18 deletions

View File

@@ -1,16 +1,16 @@
'use strict';
import UI from "./ui.js";
import API_CONFIG from "./config.js";
const MAPBOX_TOKEN = 'pk.eyJ1Ijoibmljb3BhIiwiYSI6ImNseWNwZjJjbjFidzcya3BoYTU0bHg4NnkifQ.3036JnCXZTEMt6jVgMzVRw';
const BASE_URL = location.href;
let API_URL = '';
if (BASE_URL.includes('localhost')) {
console.log(BASE_URL);
API_URL = `https://caprigis-api.ddev.site`;
API_URL = API_CONFIG.dev;
} else {
API_URL = 'https://testaec.electricmandarine.cloud/gisdb/gis';
API_URL = API_CONFIG.prod;
}
// Global leaflet