mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
16 lines
338 B
TypeScript
16 lines
338 B
TypeScript
import axios from "axios";
|
|
|
|
const backendAddr =
|
|
new URL(window.location.toString()).searchParams.get("server") ??
|
|
"[::1]:16880";
|
|
|
|
export const HTTP_URL = `http://${backendAddr}/`;
|
|
|
|
export const backend = axios.create({
|
|
baseURL: HTTP_URL,
|
|
});
|
|
|
|
export const WEBSOCKET_URL = `ws://${backendAddr}/eventstream`;
|
|
|
|
export default backend;
|