Updated server point.

This commit is contained in:
2026-02-28 16:04:47 -05:00
parent 4254145cc9
commit 3b1b4f63e2

View File

@@ -30,13 +30,13 @@ import { renderChat } from "./render.js";
* @returns {{ socket: WebSocket, sendMessage: (content: string) => void }}
*/
export function initWebSocket(username, chatEl, inputContainer, usersListEl) {
const socket = new WebSocket("ws://localhost:8080");
/*(location.protocol === "https:" ? "wss" : "ws") +
const socket = new WebSocket( //"ws://localhost:8080");
(location.protocol === "https:" ? "wss" : "ws") +
"://" +
location.host +
"/ws",
"coms",
);*/
);
socket.onopen = () => {
// Announce join.