From dff27789022dab73ac50d99cb92c91693aa61c42 Mon Sep 17 00:00:00 2001 From: Henry Hiles Date: Thu, 10 Feb 2022 11:10:23 -0500 Subject: [PATCH] Possible fix --- public/script.js | 2 +- server.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/script.js b/public/script.js index db3b5f4..b7e2e40 100644 --- a/public/script.js +++ b/public/script.js @@ -1,6 +1,6 @@ import moment from "https://jspm.dev/moment" import { io } from "https://cdn.socket.io/4.3.2/socket.io.esm.min.js" -const socket = io(":3000") +const socket = io() const messageButton = document.querySelector("#send") const menuButton = document.querySelector("#menu") const nameButton = document.querySelector("#name") diff --git a/server.js b/server.js index 91483b7..94447a2 100644 --- a/server.js +++ b/server.js @@ -6,11 +6,13 @@ const io = require("socket.io")(server, { origin: [ "http://127.0.0.1:3000", "http://192.168.1.226:3000", - "http://192.168.1.226:3000", + "https://chat.henryhiles.com", ], }, }) +io.serveClient(false) + app.set("views", "./views") app.set("view engine", "ejs") app.use(express.static("public"))