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 @@ -