Created
June 7, 2024 09:04
-
-
Save gensart-x/78159197bcaae3b411cf9f2e4d5f596f to your computer and use it in GitHub Desktop.
Revisions
-
gensart-x created this gist
Jun 7, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ // Session Setup import sessionFileStore from 'session-file-store'; import expressSession from 'express-session'; declare module 'express-session' { interface SessionData { [key: string]: any } } const fileStore = sessionFileStore(expressSession) app.use(expressSession({ secret: 'this_should_be_your_secret', resave: false, saveUninitialized: true, store: new fileStore(), cookie: { secure: false } }));