Refactor with (untracked) config + entry page
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user