Nice
All checks were successful
Deploy Encrypted Todo App / build-and-push (push) Successful in 4m16s

This commit is contained in:
2025-06-16 11:13:35 -06:00
parent a665af0c4c
commit b5f2296ade
2 changed files with 4 additions and 1 deletions

View File

@ -11,6 +11,7 @@
},
"scripts": {
"start": "node server.js",
"start:prod": "NODE_ENV=production node server.js",
"dev": "node server.js",
"docker:build": "docker build -t encrypted-todo .",
"docker:run": "docker run -p 3000:3000 encrypted-todo",

View File

@ -75,8 +75,10 @@
function connectWebSocket() {
if (!currentUser) return;
const protocol =
window.location.protocol === "https:" ? "wss:" : "ws:";
ws = new WebSocket(
`ws://${window.location.host}?userId=${currentUser}`,
`${protocol}//${window.location.host}?userId=${currentUser}`,
);
ws.onmessage = (event) => {
const msg = JSON.parse(event.data);