I set the expiration time of session to 7 days according to the way on the Internet, but it will expire after a while, probably less than half an hour. May I ask how to solve it?
express version is above 4.0. here is the configuration code:
var express = require("express");
var app = express();
var router = require("./router/mainRouter.js");
// var adminRouter = require("./router/adminRouter.js");
var session = require("express-session");
var db = require("./models/db.js");
app.use(session({
secret: "keyboard cat",
cookie: { maxAge: 604800000},
resave: true,
saveUninitialized: true,
rolling: true
}));
could you tell me how to solve this problem? is there something wrong with the configuration?