Applicatie afmaken en GUI-flow herstellen

Voegt boodschappenlijsten, productbeheer, realtime synchronisatie en browsercache-updates toe. Herstelt login- en sessiegedrag en maakt database-seeding herhaalbaar.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-08-07 20:44:05 +02:00
parent 26a820b41a
commit ce68182c08
23 changed files with 552 additions and 163 deletions
+7 -3
View File
@@ -1,8 +1,9 @@
const session = require("express-session");
const BetterSqlite3Store = require("better-sqlite3-session-store")(session);
const Database = require("better-sqlite3");
const path = require("path");
const db = new Database("sessions.sqlite");
const db = new Database(path.join(__dirname, "..", "sessions.sqlite"));
module.exports = session({
@@ -14,14 +15,17 @@ module.exports = session({
}
}),
secret: process.env.SESSION_SECRET,
secret: process.env.SESSION_SECRET || "change-this-development-secret",
resave: false,
saveUninitialized: false,
cookie: {
maxAge: 1000 * 60 * 60 * 24 * 30
maxAge: 1000 * 60 * 60 * 24 * 30,
httpOnly: true,
sameSite: "lax",
secure: process.env.NODE_ENV === "production"
}
});