lemmy/ui/src/env.ts
2019-04-09 08:03:58 -07:00

5 lines
261 B
TypeScript

let host = `${window.location.hostname}`;
let port = `${window.location.port == "4444" ? '8536' : window.location.port}`;
let endpoint = `${host}:${port}`;
export let wsUri = `${(window.location.protocol=='https:') ? 'wss://' : 'ws://'}${endpoint}/service/ws`;