Skip to content

Commit 4474a93

Browse files
committed
add redis_password
1 parent b4c49bd commit 4474a93

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ app.use(session({
9797
store: new RedisStore({
9898
port: config.redis_port,
9999
host: config.redis_host,
100+
db: config.redis_db,
101+
pass: config.redis_password,
100102
}),
101103
resave: false,
102104
saveUninitialized: false,

common/redis.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ var client = new Redis({
66
port: config.redis_port,
77
host: config.redis_host,
88
db: config.redis_db,
9+
password: config.redis_password,
910
});
1011

1112
client.on('error', function (err) {

config.default.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ var config = {
4141
redis_host: '127.0.0.1',
4242
redis_port: 6379,
4343
redis_db: 0,
44+
redis_password: '',
4445

4546
session_secret: 'node_club_secret', // 务必修改
4647
auth_cookie_name: 'node_club',

0 commit comments

Comments
 (0)