From 4018569f7bdf64b512ec13d53e4945a5de202c67 Mon Sep 17 00:00:00 2001 From: MaciejkaG Date: Sun, 7 Jan 2024 00:59:08 +0100 Subject: [PATCH] Fixes --- index.js | 2 ++ public/assets/js/spa_lib.js | 1 - views/index.handlebars | 4 ---- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 58bf8e8..0f1900d 100644 --- a/index.js +++ b/index.js @@ -19,6 +19,7 @@ app.set('views', './views'); const server = createServer(app); const io = new Server(server); +app.set('trust proxy', 1); const sessionMiddleware = session({ secret: uuidv4(), resave: true, @@ -31,6 +32,7 @@ app.use(express.static(path.join(__dirname, 'public'))); io.engine.use(sessionMiddleware); app.get("/", (req, res) => { + res.render('index'); }); diff --git a/public/assets/js/spa_lib.js b/public/assets/js/spa_lib.js index 251d1e8..bd186f0 100644 --- a/public/assets/js/spa_lib.js +++ b/public/assets/js/spa_lib.js @@ -27,7 +27,6 @@ window.addEventListener("load", () => { if (elem != null) { switchView(elem.id, true); activeView = elem.id; - } } else { switchView("mainMenuView"); diff --git a/views/index.handlebars b/views/index.handlebars index 821ff59..da3e2e3 100644 --- a/views/index.handlebars +++ b/views/index.handlebars @@ -1,7 +1,3 @@ -
- -
-