UNPKG

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