How to Manage Sessions in Nodejs With Redis
Session is an important concept that every developer should understand, without it, we wouldn’t be able to build any app that needs to keep track of users. Don’t immediately think about registered users only, think about guest users too. Storing information about users has many use cases, for example, lets think about a weather app. You, as a user, don’t need to be registered to get the weather information of your city. But wouldn’t it be great if the website remembers your city and shows it on the homepage automatically every time you open it, instead of asking you to enter it again? Of course this information doesn’t need to be stored in session, it can be stored in a local storage of your browser as well. However, the key point here is that we need a way to store information about users and retrieve it later, and that’s where sessions come in. ...