Skip to content

Commit f7523a2

Browse files
committed
Merge pull request #62 from nodezoo/no-redis
allow isolated mode without redis
2 parents 0de3221 + 3e0d100 commit f7523a2

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

CHANGELOG.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
7 April 2016 - 6.1.0
2-
---
1+
## 10 April - 6.2.0
2+
3+
* Added support for redis to enable hard caching
4+
* Updated isolated mode to run without redis
5+
6+
## 7 April 2016 - 6.1.0
7+
38
* Added CHANGELOG.md
49
* Removed redundant data folder.
510
* Removed unneeded build.sh.
@@ -9,6 +14,6 @@
914
* Added isolation mode
1015
* Updated docs to reflect changes
1116

12-
6 April 2016 - 6.0.0
13-
---
17+
## 6 April 2016 - 6.0.0
18+
1419
* First release of the 6th major revision of nodezoo.

srv/start.js

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,21 @@ var opts = {
2727
port: envs.GITHUB_PORT || '8052'
2828
},
2929
redis: {
30-
host: 'localhost',
31-
port: envs.redis_PORT || '6379'
30+
host: envs.GITHUB_REDIS_HOST || 'localhost',
31+
port: envs.GITHUB_REDIS_PORT || '6379'
3232
}
3333
}
3434

35-
console.log(envs.GITHUB_TOKEN)
35+
var Service = Seneca(opts.seneca)
3636

37-
var Service =
38-
Seneca(opts.seneca)
39-
.use(Entities)
40-
.use(RedisStore, opts.redis)
41-
.use(Github, opts.github)
37+
Service.use(Entities)
4238

43-
envs.GITHUB_ISOLATED
44-
? Service.listen(opts.isolated)
45-
: Service.use(Mesh, opts.mesh)
39+
if (envs.GITHUB_ISOLATED) {
40+
Service.listen(opts.isolated)
41+
}
42+
else {
43+
Service.use(Mesh, opts.mesh)
44+
Service.use(RedisStore, opts.redis)
45+
}
46+
47+
Service.use(Github, opts.github)

0 commit comments

Comments
 (0)