Nodejs 错误整理
创建日期:2015-01-22 15:57

运行出错

调用express-session时,报错

express-session deprecated undefined resave option; provide resave option app.js:63:9
express-session deprecated undefined saveUninitialized option; provide saveUninitialized option app.js:63:9

In your configuration to session, you need to specify the resave and the saveUninitialized options to the value you want to use.
See https://github.com/expressjs/session#options for their values and meanings.

Example:

app.use(session({
    secret: cookie_secret,
    name: cookie_name,
    store: sessionStore, // connect-mongo session store
    proxy: true,
    resave: true,
    saveUninitialized: true
}));

参考资料 https://github.com/expressjs/session/issues/56