What is a good session store for a single-host Node.js production app?

后端 未结 8 1464
太阳男子
太阳男子 2020-11-29 15:38

I\'m using Node\'s Express w/ Connect middleware. Connect\'s memory session store isn\'t fit for production:

Warning: connection.session() Memo         


        
8条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-29 16:05

    I would still use Redis even for local development. This is helpful because it stores the session even when you restart the Node application, keeping your browser session logged in. Redis by default saves the session in memory, same as connect's memory store is simple to configure (I just run it in screen along with my node apps) can support multiple applications if you just use a different database or session value in the configuration.

提交回复
热议问题