I am trying to work through setting up a nodejs app using express 4.x. After stumbling through the middleware-removal issues, I finally got it working.
however, there was a couple of warning messages in the following line of code :
app.use(session({secret: '<mysecret>'})
these warnings were :
Sun, 29 Jun 2014 12:45:10 GMT express-session deprecated pass resave option; default value will change at libconfigexpress.js:55:11
Sun, 29 Jun 2014 12:45:10 GMT express-session deprecated pass saveUninitialized option; default value will change at libconfigexpress.js:55:11
in the documentation, the default values for resave and saveUninitialized are true.
so, changing the code to read
app.use(session({secret: '<mysecret>',
saveUninitialized: true,
resave: true}));
got rid of the warnings.
So, to get to the point of the question:
why should I have to pass these values in if they are the default values, and why don't I have to pass in the other options ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…