Skip to content

Instantly share code, notes, and snippets.

View earihos's full-sized avatar

Arif Hossen earihos

  • UK
View GitHub Profile
@earihos
earihos / frontend-ws-connection.ts
Created December 4, 2021 11:54 — forked from jsdevtom/frontend-ws-connection.ts
kubernetes-ingress websockets with nodejs
export const ws = webSocket<WebsocketMessage>(`wss://${location.hostname}:${location.protocol === 'https:' ? 443 : 80}/ws/`);
export const wsObserver = ws
.pipe(
retryWhen(errors =>
errors.pipe(
delay(1000)
)
)
);