diff --git a/src/utils/Types.ts b/src/utils/Types.ts index e161081..0e9eab3 100644 --- a/src/utils/Types.ts +++ b/src/utils/Types.ts @@ -8,9 +8,10 @@ export type Connection = { events: LimitedArray; }; -// export const endpoint = `${window.location.protocol}//${window.location.host}${window.location.pathname.replace(/\/+$/, '')}`; -export const endpoint = "http://localhost:2567" -export const client = new Client(endpoint); +export const baseEndpoint = `${window.location.protocol}//${window.location.host}`; +export const endpoint = `${baseEndpoint}${window.location.pathname.replace(/\/+$/, '')}`; + +export const client = new Client(baseEndpoint); export const global = { connections: [] as Connection[], };