📜  npm express-session - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:43.828000             🧑  作者: Mango

代码示例1
npm i express-session    //On Hyper/CMD

const session = require('express-session');    //To Acquire it

app.use(session({         //Usuage
  secret: 'keyboard cat',
  resave: false,
  saveUninitialized: true,
  cookie: { secure: true }
}));