how to use sessions in express, couchDB, and node.js

后端 未结 4 400
你的背包
你的背包 2020-12-24 07:38

so I basically want to use sessions to store the users name and check to see if the user logged in or not. If not, the page will redirect to the login page.

I am usi

4条回答
  •  一个人的身影
    2020-12-24 07:47

    If you're doing app.use(app.router) before the lines that set up the cookie and session handling, try moving it to after them. That fixed the same problem for me.

提交回复
热议问题