var app = express();
app.use(require('cookie-parser')(config.sessionSecret));
app.use(session({
secret: config.sessionSecret,
key:'sid',
store: new MongoStore({
db: config.db.name,
host: config.db.host,
port: config.db.port,
username: config.db.user,
password: config.db.pass,
auto_reconnect: true
})
}));
app.use(compress());
app.use(csurf());
这样的配置,照着node-club做的,但是无论怎么提交都提示错误,郁闷。