Updated server point.
This commit is contained in:
@@ -30,13 +30,13 @@ import { renderChat } from "./render.js";
|
|||||||
* @returns {{ socket: WebSocket, sendMessage: (content: string) => void }}
|
* @returns {{ socket: WebSocket, sendMessage: (content: string) => void }}
|
||||||
*/
|
*/
|
||||||
export function initWebSocket(username, chatEl, inputContainer, usersListEl) {
|
export function initWebSocket(username, chatEl, inputContainer, usersListEl) {
|
||||||
const socket = new WebSocket("ws://localhost:8080");
|
const socket = new WebSocket( //"ws://localhost:8080");
|
||||||
/*(location.protocol === "https:" ? "wss" : "ws") +
|
(location.protocol === "https:" ? "wss" : "ws") +
|
||||||
"://" +
|
"://" +
|
||||||
location.host +
|
location.host +
|
||||||
"/ws",
|
"/ws",
|
||||||
"coms",
|
"coms",
|
||||||
);*/
|
);
|
||||||
|
|
||||||
socket.onopen = () => {
|
socket.onopen = () => {
|
||||||
// Announce join.
|
// Announce join.
|
||||||
|
|||||||
Reference in New Issue
Block a user