forked from lisong/code-push-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.testwin.js
60 lines (59 loc) · 1.43 KB
/
config.testwin.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
var os = require('os');
var config = {};
config.test = {
db: {
username: "root",
password: "Password12!",
database: "codepush_test",
host: "127.0.0.1",
port: 3306,
dialect: "mysql",
logging: false,
operatorsAliases: false,
},
local: {
storageDir: os.tmpdir(),
downloadUrl: "http://127.0.0.1:3000/download",
public: '/download'
},
jwt: {
tokenSecret: 'INSERT_RANDOM_TOKEN_KEY'
},
common: {
tryLoginTimes: 10,
diffNums: 3,
dataDir: os.tmpdir(),
storageType: "local",
updateCheckCache: true,
rolloutClientUniqueIdCache: false,
},
smtpConfig: false,
redis: {
default: {
host: "127.0.0.1",
port: 6379,
retry_strategy: function (options) {
if (options.error.code === 'ECONNREFUSED') {
return new Error('The server refused the connection');
}
if (options.total_retry_time > 1000 * 60 * 60) {
return new Error('Retry time exhausted');
}
if (options.times_connected > 10) {
return undefined;
}
// reconnect after
return Math.max(options.attempt * 100, 3000);
}
}
}
}
config.test.log4js = {
appenders: {console: { type: 'console'}},
categories : {
"default": { appenders: ['console'], level:'error'},
"startup": { appenders: ['console'], level:'info'},
"http": { appenders: ['console'], level:'info'}
}
}
module.exports = config;