
Replace the Vue v2 webapp with a Vue v3 one, and embed the OpenAPI client in the webapp itself (instead of being its own npm project). - Vue v2.x -> v3.x - Tabulator v4.x -> v5.1 - Moment JS -> replaced with Luxon JS - Vue CLI/UI -> replaced with Vite
23 lines
379 B
JavaScript
23 lines
379 B
JavaScript
|
|
let url = new URL(window.location.href);
|
|
url.port = "8080";
|
|
const flamencoAPIURL = url.href;
|
|
|
|
url.protocol = "ws:";
|
|
const websocketURL = url.href;
|
|
|
|
const URLs = {
|
|
api: flamencoAPIURL,
|
|
ws: websocketURL,
|
|
};
|
|
|
|
console.log("Flamenco API:", URLs.api);
|
|
console.log("Websocket :", URLs.ws);
|
|
|
|
export function ws() {
|
|
return URLs.ws;
|
|
}
|
|
export function api() {
|
|
return URLs.api;
|
|
}
|