diff options
| author | Maks Jopek <maksymilian.jopek@prym-soft.pl> | 2021-04-25 12:07:36 +0200 |
|---|---|---|
| committer | Maks Jopek <maksymilian.jopek@prym-soft.pl> | 2021-04-25 12:07:36 +0200 |
| commit | 013319d7a4651d1708280f556e39c2f03839426a (patch) | |
| tree | 704e51c6d4d96360611819628be3c78edec2f9d8 /backend/ts/index.ts | |
| parent | 13dcc2c8fc1d11e3b94432fffc4c4f186bd94d29 (diff) | |
| download | fia-013319d7a4651d1708280f556e39c2f03839426a.tar.gz fia-013319d7a4651d1708280f556e39c2f03839426a.tar.zst fia-013319d7a4651d1708280f556e39c2f03839426a.zip | |
Almost going in a circle
Diffstat (limited to 'backend/ts/index.ts')
| -rw-r--r-- | backend/ts/index.ts | 9 |
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")); |
