I've seen several posts related to this but none solved my problem. I have this code in server.js var express = require('express'); var app = express(); app.configure(function(){
Solution 1:
Decided to copy from comments. Try replacing
app.configure(function(){
app.set(express.cookieParser());
app.set(express.session({secret: "This is a secret"}));
});
with
app.use(express.cookieParser());
app.use(express.session({secret: "This is a secret"}));
and see what happens.
Share
Post a Comment
for "Req.session Undefined In Express.js"
Post a Comment for "Req.session Undefined In Express.js"