reverted to express-session

This commit is contained in:
lllllllillllllillll 2023-12-11 01:32:07 -08:00
parent 6ad89b9914
commit 54381968a5
1 changed files with 3 additions and 2 deletions

5
app.js
View File

@ -1,10 +1,9 @@
// Express
const express = require("express");
const app = express();
const session = require("cookie-session");
const session = require("express-session");
const PORT = process.env.PORT || 8000;
// Router
const routes = require("./routes");
@ -19,6 +18,8 @@ const sessionMiddleware = session({
resave: false,
saveUninitialized: false,
cookie:{
secure:false, // Only set to true if you are using HTTPS.
httpOnly:false, // Only set to true if you are using HTTPS.
maxAge:3600000 * 8 // Session max age in milliseconds. 3600000 = 1 hour.
}
})