title: connect.cookieParser and connect.session
body: <p>I am new to connect framework. I want to use cookieParser() and session management. Please correct the below code and why it shown this error.</p>
  
  <pre><code>var connect = require("connect");
  var app = connect();
  connect()
      .use(connect.cookieParser())
      .use(connect.session({ secret: 'some secret text', cookie: { maxAge:       30000}}))
      .use(function(req, res) {
          var sess = req.session,
          url = req.url.split("/");
  
      if (url[1] == "name" &amp;&amp; url[2]) {
          sess.name = url[2];
          res.end("name saved: " + url[2]);
      } else if (sess.name) {
          res.write("session-stored name: " + sess.name);    
          res.end("stored for another: " + (sess.cookie.maxAge / 1000) +seconds");
      } else {
          res.end("no stored name; go to /name/{name} to save a name");
      }
  }).listen(3000);
  </code></pre>
  
  <p>Following is error shown:</p>
  
  <pre><code>C:\Users\Sagar\workspace\Node_connect\public\session.js:5
      .use(connect.cookieParser())
                   ^
  TypeError: undefined is not a function
      at Object.&lt;anonymous&gt; (C:\Users\Sagar\workspace\Node_connect\public\session.js:5:18)
      at Module._compile (module.js:460:26)
      at Object.Module._extensions..js (module.js:478:10)
      at Module.load (module.js:355:32)
      at Function.Module._load (module.js:310:12)
      at Function.Module.runMain (module.js:501:10)
      at startup (node.js:129:16)
      at node.js:814:3
  </code></pre>