Files
helium/app/composables/useWebSocketUrl.ts
2025-11-01 01:16:57 +01:00

10 lines
249 B
TypeScript

export const useWebSocketUrl = () => {
if (import.meta.client) {
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:'
const host = window.location.host
return `${protocol}//${host}/ws/signaling`
}
return ''
}