aboutsummaryrefslogtreecommitdiffstats
path: root/backend/ts/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'backend/ts/index.ts')
-rw-r--r--backend/ts/index.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/backend/ts/index.ts b/backend/ts/index.ts
index e4ec5ee..32ac644 100644
--- a/backend/ts/index.ts
+++ b/backend/ts/index.ts
@@ -17,7 +17,14 @@ const PORT = 8000;
if (!process.env.SESSION_KEY)
throw Error("SESSION_KEY is undefined");
-app.use(session({ secret: process.env.SESSION_KEY, cookie: { maxAge: 60000 } }));
+app.use(session({
+ secret: process.env.SESSION_KEY,
+ saveUninitialized: true,
+ resave: true,
+ cookie: {
+ expires: new Date(Date.now() + 3600000),
+ }
+}));
app.use(express.json());
app.use("/", express.static("./public"));