--

I fixed the syntax issue in my code.

This is the reason to use Redis,

We can use express-session middleware to manage sessions in Nodejs. The session is stored in the express server itself. 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. To manage multiple sessions for multiple users we have to create a global Map. Global variables in NodeJs are memory consuming and can prove to be terrible security holes in production level projects.

--

--

Chamith Madusanka
Chamith Madusanka

Written by Chamith Madusanka

Full Stack Enthusiast | JavaScript | TypeScript | ReactJs | NextJs | | NodeJs | NestJs | Serverless | Find me on Linkedin https://www.linkedin.com/in/chamith24/

No responses yet