Skip to content

Instantly share code, notes, and snippets.

View kousik93's full-sized avatar
💭
Infrastructure @proofpoint

Kousik Sundar kousik93

💭
Infrastructure @proofpoint
View GitHub Profile
@jsdevtom
jsdevtom / frontend-ws-connection.ts
Last active April 17, 2024 07:35
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)
)
)
);