How to express 4.0,express-session with odd warning message?

How to express 4.0,express-session with odd warning message?

Asked on October 24, 2018 in node.js.
Add Comment


  • 4 Answer(s)

    The default values will change so they want to ensure that by setting the values explicitly now, we cannot run into unexpected behavior when the defaults do change

    Answered on October 24, 2018.
    Add Comment

    This will be very useful:

    app.use(session({
        secret: cookie_secret,
        resave: true,
        saveUninitialized: true
    }));
    

    The above code can be used express 4.0,express-session with odd warning message.

    Answered on October 24, 2018.
    Add Comment

    Try this code:

    secret: process.env.SESSION_SECRET || '<mysecret>',
    
    

    Using the code we can express 4.0,express-session with odd warning message.

    Answered on October 24, 2018.
    Add Comment

    app.use(session({
    secret
    : cookie_secret,
    resave
    : true,
    saveUninitialized
    : true
    }));

    Answered on February 21, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.