Skip to content

Commit

Permalink
fix koa-redis
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhutu committed Apr 4, 2016
1 parent 1bc915f commit 6dc5b1e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
6 changes: 6 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
1.1.2 / 2016-04-04
==================

* 修复koa-redis 设置redis密码


1.1.1 / 2016-03-30
==================

Expand Down
12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jackblog-api-koa",
"version": "1.1.1",
"version": "1.1.2",
"description": "jackblog API koa版",
"main": "server/app.js",
"scripts": {
Expand Down Expand Up @@ -44,18 +44,17 @@
"koa-redis": "^2.0.1",
"koa-response-time": "^1.0.2",
"koa-router": "^5.3.0",
"lodash": "^4.6.1",
"markdown-it": "^6.0.0",
"lodash": "^4.7.0",
"markdown-it": "^6.0.1",
"mongoose": "^4.4.10",
"passport-github": "^1.1.0",
"passport-local": "^1.0.0",
"passport-qq": "0.0.3",
"passport-weibo": "^0.1.2",
"pm2": "^1.0.2",
"pm2": "^1.1.1",
"qiniu": "^6.1.9"
},
"devDependencies": {
"del": "^2.2.0",
"gulp": "^3.9.1",
"gulp-coveralls": "^0.1.4",
"gulp-env": "^0.4.0",
Expand All @@ -64,10 +63,7 @@
"gulp-nodemon": "^2.0.6",
"gulp-sequence": "^0.4.5",
"gulp-util": "^3.0.7",
"mocha": "^2.4.5",
"nock": "^7.7.2",
"should": "^8.3.0",
"should-promised": "^0.3.1",
"sinon": "^1.17.3",
"supertest": "^1.2.0"
}
Expand Down
6 changes: 5 additions & 1 deletion server/config/koa.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ module.exports = function(app) {
app.keys = [config.session.secrets];
app.use(session({
key: "jackblog.sid",
store: new RedisStore(config.redis),
store: new RedisStore({
host:config.redis.host,
port:config.redis.port,
auth_pass:config.redis.password || ''
}),
cookie: config.session.cookie
}));
app.use(passport.initialize());
Expand Down

0 comments on commit 6dc5b1e

Please sign in to comment.