title: node.js express cookie-session session id undefined
body: <p>I'm using node.js with express and the cookie-session library, and in request handlers, req.session.id is undefined - could anyone provide suggestions on creating and using a session id with cookie session or any cookie based session library within express? </p>
  
  <p>Edit: My cookie-sesssion is set up as follows</p>
  
  <pre><code>var session = require('cookie-session');    
  app.use(session({
              key: 'express.sid',
              secret: secretKey,
              saveUninitialized: true,
              resave: true,
              cookie: {
                  maxAge: 1000 * 60 * 60 * 72,
                  httpOnly: true,
                  secure: true
              }
          }));
  </code></pre>
  
  <p>then wherever I have an endpoint, eg. </p>
  
  <pre><code>router.get('/api/something', function (req, res) {
  </code></pre>
  
  <p>req.session.id and req.sessionID are undefined. If I use a normal express session they're populated. </p>