I use app.post(); directly in app.js to get the session.
But I can’t get the session when I use router.post(); in the router.
What’s going on? Seek the guidance of the great God
As shown
Display seesion cannot be obtained
巴扎黑2017-05-17 09:59:04
Is it a matter of order? The session middleware needs to be before all routers
仅有的幸福2017-05-17 09:59:04
It seems that your second router is not associated with the app,
so the one behind you does not enter the session middleware, causing the session to be unavailable.