app.use(session({
secret: process.env.COOKIE_SECRET,
resave: false,
saveUninitialized: true,
cookie: { maxAge: 1000 * 60 * 60 * 24 },
store //connect-mongodb-session
}))
const express = require('express')
const session = require('express-session')
const app = express()
app.use(session({
'secret': '343ji43j4n3jn4jk3n'
}))
app.use(express.session(
{ secret: "secret", store: new MemoryStore(), expires: new Date(Date.now() + (30 * 86400 * 1000))
}));
$ npm install express-session