10 lines
217 B
TypeScript
10 lines
217 B
TypeScript
|
export function getWebsocketUrl(): string {
|
||
|
let scheme = 'ws';
|
||
|
|
||
|
if (document.location.protocol === 'https:') {
|
||
|
scheme += 's';
|
||
|
}
|
||
|
|
||
|
return scheme + '://' + document.location.hostname + ':8081';
|
||
|
}
|