You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I checked my redis-server status , it says redis server is running but I got this error when I log
RedisClient.on('error', function(err) {
console.log('Redis error: ' + err);// Redis error: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
});
and when I try to console the req.session it returns undefined. any clue about this issue?
please help me I am new to this. thank you
heres my setup:
`var express = require('express');
var redis = require("redis");
var session = require('express-session');
var redisStore = require('connect-redis')(session);
var parser = require('body-parser');
var RedisClient= redis.createClient();
When I checked my redis-server status , it says redis server is running but I got this error when I log
RedisClient.on('error', function(err) {
console.log('Redis error: ' + err);// Redis error: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
});
and when I try to console the req.session it returns undefined. any clue about this issue?
please help me I am new to this. thank you
heres my setup:
`var express = require('express');
var redis = require("redis");
var session = require('express-session');
var redisStore = require('connect-redis')(session);
var parser = require('body-parser');
var RedisClient= redis.createClient();
app.use(session({
secret: 'myseceret',
store: new redisStore({host: '127.0.0.1', port: 6379, client: client,ttl : 260}),
saveUninitialized: false,
resave: false,
cookie: { secure: true }
}));
client.on('error', function(err) {
console.log('Redis error: ' + err);
});
`
The text was updated successfully, but these errors were encountered: