📜  experss cookie 会话 - Javascript 代码示例

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

代码示例1
var cookieSession = require('cookie-session')
var express = require('express')

var app = express()

app.use(cookieSession({
  name: 'session',
  keys: [/* secret keys */],

  // Cookie Options
  maxAge: 24 * 60 * 60 * 1000 // 24 hours
}))