flamenco/web/app/src/urls.js
Sybren A. Stüvel 555c935790 Web: Replace Vue 2 with Vue 3 webapp
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
2022-04-12 12:34:49 +02:00

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;
}