lemmy/ui/src/env.ts

5 lines
261 B
TypeScript
Raw Normal View History

2019-04-09 15:03:58 +00:00
let host = `${window.location.hostname}`;
let port = `${window.location.port == "4444" ? '8536' : window.location.port}`;
let endpoint = `${host}:${port}`;
2019-04-09 14:46:44 +00:00
export let wsUri = `${(window.location.protocol=='https:') ? 'wss://' : 'ws://'}${endpoint}/service/ws`;