lemmy/ui/src/env.ts

10 lines
277 B
TypeScript
Raw Normal View History

2020-01-26 18:53:57 +00:00
const host = `${window.location.hostname}`;
const port = `${
window.location.port == '4444' ? '8540' : window.location.port
}`;
2020-01-26 18:53:57 +00:00
const endpoint = `${host}:${port}`;
export const wsUri = `${
window.location.protocol == 'https:' ? 'wss://' : 'ws://'
}${endpoint}/api/v1/ws`;