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
+26 -1
View File
@@ -57,9 +57,29 @@ module.exports = () => {
app.use(session);
app.use(flash());
app.use(userMiddleware);
app.use(flash());
app.use((req, res, next) => {
res.set("X-PantryHub-Worktree", __dirname);
res.locals.user = req.user || null;
res.locals.success = req.flash("success");
res.locals.error = req.flash("error");
res.locals.info = req.flash("info");
res.locals.warning = req.flash("warning");
res.locals.title = "PantryHub";
next();
});
app.get("/__version", (req, res) => {
res.set("Cache-Control", "no-store");
res.json({
app: "PantryHub",
root: path.join(__dirname, ".."),
pid: process.pid
});
});
app.use(
@@ -69,6 +89,11 @@ app.use(flash());
);
app.use(
"/api",
require("../routes/api")
);
app.use(
"/",
require("../routes/auth")