title: How to save and retrieve session from Redis
body: <p>I am trying to integrate Redis sessions into my authentication system written in Node.js.</p>
  <p>I have been able to successfully set up Redis server, <code>connect-redis</code> and Express server.</p>
  <p>Here is my setup (just the important bit):</p>
  <pre><code>var express = require(&quot;express&quot;);
  var RedisStore = require(&quot;connect-redis&quot;)(express);
  var redis = require(&quot;redis&quot;).createClient();
  
  app.use(express.cookieParser());
  app.use(express.session({
      secret: &quot;thisismysecretkey&quot;,
      store: new RedisStore({ host: 'localhost', port: 6379, client: redis })
  }));
  </code></pre>
  <p>Now... How do I actually create, read and destroy the session? I am aware that that is probably extremely simple. I have read tons of articles on how to setup <code>connect-redis</code> and many questions here on SO, but I swear each one stops on just the configuration and does not explain how to actually use it...</p>