-
Notifications
You must be signed in to change notification settings - Fork 154
/
Copy pathconfig.js
59 lines (57 loc) · 1.72 KB
/
config.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
let secrets = require('./secrets-sample.json')
if (process.env.NODE_ENV === 'production') {
secrets = require('./secrets.json')
if (!secrets) {
throw new Error(`Cannot run unless you create secrets.json in the root.
(Copy from secrets-sample.json and modify)`)
}
}
module.exports = {
secrets,
CLAIM_STATUS: {
CLAIMED: 'claimed',
ACCEPTED: 'accepted',
REJECTED: 'rejected',
DISPUTED: 'disputed',
REVOKED: 'revoked'
},
PAGINATION_SIZE: 10,
TEST_MODE: false,
development: {
username: process.env.BOSS_DB_USER || 'postgres',
password: process.env.BOSS_DB_PASS || 'postgres',
database: process.env.BOSS_DB_NAME || 'boss',
host: secrets.BOSS_DB_HOST || 'localhost',
port: process.env.BOSS_DB_PORT || 5432,
dialect: 'postgres',
maxConcurrentQueries: 100,
pool: { maxConnections: 5, maxIdleTime: 30 },
language: 'en',
alter: false,
logging: false
},
test: {
username: process.env.BOSS_DB_USER || 'postgres',
password: process.env.BOSS_DB_PASS || 'postgres',
database: process.env.BOSS_DB_NAME || 'boss',
host: secrets.BOSS_DB_HOST || 'localhost',
port: process.env.BOSS_DB_PORT || 5432,
dialect: 'postgres',
maxConcurrentQueries: 100,
pool: { maxConnections: 5, maxIdleTime: 30 },
language: 'en',
logging: false
},
production: {
username: process.env.BOSS_DB_USER || 'postgres',
password: process.env.BOSS_DB_PASS || 'postgres',
database: process.env.BOSS_DB_NAME || 'boss',
host: secrets.BOSS_DB_HOST || 'localhost',
port: process.env.BOSS_DB_PORT || 5432,
dialect: 'postgres',
maxConcurrentQueries: 100,
pool: { maxConnections: 5, maxIdleTime: 30 },
language: 'en',
logging: false
}
}