Express.js在使用会话时没有响应

这是我的应用程序:

var express = require('express'), app = express.createServer(), RedisStore = require('connect-redis')(express); app.configure (function(){ app.use (express.logger({ format: ":method :url" })); app.use (express.bodyParser()); app.use (express.cookieParser()); app.use (express.session({ store: new RedisStore, secret: "totally random string" })); }); app.configure ('development', function () { console.log ("Development mode."); }); app.configure ('production', function () { console.log ("Production mode."); }); app.get ('/', function (req, res) { res.contentType("text/html"); res.send("hello", 200); res.end(); }) console.log ("Listening to *:"+8006); app.listen (8006); 

当我使用本地主机时,它挂在浏览器中:8006 /

任何想法什么是错的? 我可能会错过1个小细节。
它在app.use (express.session...行被注释掉的时候app.use (express.session...

谢谢

       

网上收集的解决方案 "Express.js在使用会话时没有响应"

删除res.end()并停止挂起并呈现页面。

 var express = require('express'), app = express.createServer(); app.configure (function(){ app.use (express.logger({ format: ":method :url" })); app.use (express.bodyParser()); app.use (express.cookieParser()); }); app.configure ('development', function () { console.log ("Development mode."); }); app.configure ('production', function () { console.log ("Production mode."); }); app.get ('/', function (req, res) { res.contentType("text/html"); res.send("hello"); }) console.log ("Listening to *:"+8006); app.listen (8006);