Skip to content

Instantly share code, notes, and snippets.

View JakubNer's full-sized avatar

Jakub Ner JakubNer

View GitHub Profile
@JakubNer
JakubNer / frontend-ws-connection.ts
Created May 23, 2019 18:55 — 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)
)
)
);