reverted to express-session
This commit is contained in:
parent
6ad89b9914
commit
54381968a5
5
app.js
5
app.js
|
@ -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.
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue