lemmy/ui/src/env.ts

7 lines
264 B
TypeScript
Raw Normal View History

2019-04-09 11:03:58 -04:00
let host = `${window.location.hostname}`;
let port = `${window.location.port == '4444' ? '8536' : window.location.port}`;
2019-04-09 11:03:58 -04:00
let endpoint = `${host}:${port}`;
export let wsUri = `${
window.location.protocol == 'https:' ? 'wss://' : 'ws://'
}${endpoint}/api/v1/ws`;