Skip to content

Instantly share code, notes, and snippets.

View mgeissen's full-sized avatar
💙
Focusing

Matthias Geißendörfer mgeissen

💙
Focusing
View GitHub Profile
@jsdevtom
jsdevtom / frontend-ws-connection.ts
Last active July 17, 2024 17:37
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)
)
)
);