File tree 7 files changed +24
-22
lines changed
7 files changed +24
-22
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,10 @@ app.set('port', process.env.PORT || 3027);
11
11
12
12
/* ======== cache ======== */
13
13
var cache_options = {
14
- expire : 3
14
+ expire : 3 ,
15
+ host : process . env . EX_RE_CA_HOST || 'localhost' ,
16
+ port : process . env . EX_RE_CA_PORT || 6379 ,
17
+ prefix : process . env . EX_RE_CA_PREFIX || 'erct:'
15
18
} ;
16
19
17
20
var cache = require ( '../' ) ( cache_options ) ;
Original file line number Diff line number Diff line change 10
10
11
11
var cache ;
12
12
13
- var prefix = 'erct:' ;
14
- var host = 'localhost' ;
15
- var port = 6379 ;
13
+ var prefix = process . env . EX_RE_CA_PREFIX || 'erct:' ;
14
+ var host = process . env . EX_RE_CA_HOST || 'localhost' ;
15
+ var port = process . env . EX_RE_CA_PORT || 6379 ;
16
16
17
17
describe ( 'Module' , function ( ) {
18
18
Original file line number Diff line number Diff line change 10
10
11
11
var config = require ( '../package.json' ) . config ;
12
12
13
- var prefix = 'erct:' ;
14
- var host = 'localhost' ;
15
- var port = 6379 ;
13
+ var prefix = process . env . EX_RE_CA_PREFIX || 'erct:' ;
14
+ var host = process . env . EX_RE_CA_HOST || 'localhost' ;
15
+ var port = process . env . EX_RE_CA_PORT || 6379 ;
16
16
17
17
var _name = 'test1' ;
18
18
var _body = 'test1 test1 test1' ;
Original file line number Diff line number Diff line change 7
7
var mocha = require ( 'mocha' ) ;
8
8
var should = require ( 'should' ) ;
9
9
10
- var prefix = 'erct' ;
11
- var host = 'localhost' ;
12
- var port = 6379 ;
10
+ var prefix = process . env . EX_RE_CA_PREFIX || 'erct: ' ;
11
+ var host = process . env . EX_RE_CA_HOST || 'localhost' ;
12
+ var port = process . env . EX_RE_CA_PORT || 6379 ;
13
13
14
14
var cache = require ( '../' ) ( {
15
15
prefix : prefix ,
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ var should = require('should');
6
6
var request = require ( 'request' ) ;
7
7
var util = require ( 'util' ) ;
8
8
9
- var prefix = 'erct:' ;
10
- var host = 'localhost' ;
11
- var port = 6379 ;
9
+ var prefix = process . env . EX_RE_CA_PREFIX || 'erct:' ;
10
+ var host = process . env . EX_RE_CA_HOST || 'localhost' ;
11
+ var port = process . env . EX_RE_CA_PORT || 6379 ;
12
12
13
13
var spawn ,
14
14
express_port ,
Original file line number Diff line number Diff line change 8
8
var mocha = require ( 'mocha' ) ;
9
9
var should = require ( 'should' ) ;
10
10
11
- var prefix = 'erct:' ;
12
- var host = 'localhost' ;
13
- var port = 6379 ;
14
-
11
+ var prefix = process . env . EX_RE_CA_PREFIX || 'erct:' ;
12
+ var host = process . env . EX_RE_CA_HOST || 'localhost' ;
13
+ var port = process . env . EX_RE_CA_PORT || 6379 ;
14
+
15
15
var _name = 'test1' ;
16
16
var _body = 'test1 test1 test1' ;
17
17
var _type = 'text/plain' ;
Original file line number Diff line number Diff line change 8
8
var mocha = require ( 'mocha' ) ;
9
9
var should = require ( 'should' ) ;
10
10
11
-
12
- var prefix = 'erct' ;
13
- var host = 'localhost' ;
14
- var port = 6379 ;
15
-
11
+ var prefix = process . env . EX_RE_CA_PREFIX || 'erct:' ;
12
+ var host = process . env . EX_RE_CA_HOST || 'localhost' ;
13
+ var port = process . env . EX_RE_CA_PORT || 6379 ;
14
+
16
15
var cache = require ( '../' ) ( {
17
16
prefix : prefix ,
18
17
host : host ,
You can’t perform that action at this time.
0 commit comments