This commit is contained in:
MaciejkaG 2024-01-07 00:59:08 +01:00
parent c2975bedc9
commit 4018569f7b
3 changed files with 2 additions and 5 deletions

View File

@ -19,6 +19,7 @@ app.set('views', './views');
const server = createServer(app); const server = createServer(app);
const io = new Server(server); const io = new Server(server);
app.set('trust proxy', 1);
const sessionMiddleware = session({ const sessionMiddleware = session({
secret: uuidv4(), secret: uuidv4(),
resave: true, resave: true,
@ -31,6 +32,7 @@ app.use(express.static(path.join(__dirname, 'public')));
io.engine.use(sessionMiddleware); io.engine.use(sessionMiddleware);
app.get("/", (req, res) => { app.get("/", (req, res) => {
res.render('index'); res.render('index');
}); });

View File

@ -27,7 +27,6 @@ window.addEventListener("load", () => {
if (elem != null) { if (elem != null) {
switchView(elem.id, true); switchView(elem.id, true);
activeView = elem.id; activeView = elem.id;
} }
} else { } else {
switchView("mainMenuView"); switchView("mainMenuView");

View File

@ -1,7 +1,3 @@
<div class="container" id="loadingView" data-title="Statki" data-path="/">
</div>
<div class="container" id="mainMenuView" data-title="Statki" data-path="/"> <div class="container" id="mainMenuView" data-title="Statki" data-path="/">
<div> <div>
<h1>Statki</h1> <h1>Statki</h1>