search

Home  >  Q&A  >  body text

javascript - Can't get the value of session in express?

The session in my app.js is set up like this.


But when I get it, I can't get it alive. It prints out as undefined. However, when I log in, I have assigned the user information to req.session.user in the login function. , and can be printed directly

我想大声告诉你我想大声告诉你2753 days ago491

reply all(1)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-19 10:38:23

    I looked at the documentation for cookie-session and didn’t find your usage.

    Your usage is express-sessions.

    reply
    0
  • Cancelreply