node.js express needs to enter admin through adminlogin, otherwise it will not be able to access admin. How to write to jump directly to the adminlogin page?
Then there is another problem, that is, when entering /admin in the address bar, you must first jump to the /adminlogin page
高洛峰2017-06-10 09:50:29
Check the cookie before admin
routing. If there is a valid cookie, continue the access. If not, jump to adminlogin
.
To handle cookies, you can use express-session
This library supports Redis and MongoDB.