lemmy/ui/src/env.ts
2020-01-26 19:53:57 +01:00

5 lines
269 B
TypeScript
Vendored

const host = `${window.location.hostname}`;
const port = `${window.location.port == '4444' ? '8536' : window.location.port}`;
const endpoint = `${host}:${port}`;
export const wsUri = `${window.location.protocol == 'https:' ? 'wss://' : 'ws://'}${endpoint}/api/v1/ws`;