
Full-Stack React, TypeScript, and Node
By :

In this section, we will start building out our backend. We'll create our Express project and set up Redis-based session state.
Now that we understand what Redis is and how to install it. Let's go over how Express and Redis will work together in our server. As we discussed in Chapter 8, Learning Server-Side Development with Node.js and Express, Express is basically a wrapper around Node. And this wrapper provides additional capabilities for Node by using middleware. Session state is also an Express middleware.
In our application, Express will provide a session object with relevant capabilities, such as creating cookies on the user browser and various functions to help set up and maintain the session. Redis will be the data store for our session data. Since Redis is ultra-fast at storing and retrieving data, it is a good use case of Redis.
Let's now create our project using Express and Redis: