express-session After the Express4.x version, modules such as session and cookies are no longer included in the Express framework, and the corresponding modules need to be added separately.
Just store the login information directly in the cookie. Every time you request your node, you can get the cookie, and then write a middleware to verify the cookie.
Example:
Just store the login information directly in the cookie. Every time you request your node, you can get the cookie, and then write a middleware to verify the cookie.
req.session.user = user, determine whether it has expired in the routing, use(flash()) is passed as a message