Dan Albert ca640ebabe Move the default port to 16880.
1688 is used by MS KMS.
2022-03-07 17:56:10 -08:00

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;