When I ran the server locally at port 8080
, it worked normally at authenticating and serializing data. But the time I ran my code on live production , yea it normally authenticate but it doesn't store any data to session!
I wonder what middleware supposed to be setup for this matter?
According to express-session
middleware documentation:
The default server-side session storage, MemoryStore, is purposely not designed for a production environment. It will leak memory under most conditions, does not scale past a single process, and is meant for debugging and developing.
For a list of stores, see compatible session stores .
Two most popular one for production environments are:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.