-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.js
48 lines (39 loc) · 958 Bytes
/
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
var config_local = {
// Customer module configs
"db": {
"server": "postgres://postgres:[email protected]",
"database": "vulnerablenode"
}
}
var config_devel = {
// Customer module configs
"db": {
"server": "postgres://postgres:[email protected]",
"database": "vulnerablenode"
}
}
var config_docker = {
// Customer module configs
"db": {
"server": "postgres://postgres:postgres@postgres_db",
"database": "vulnerablenode"
}
}
// Select correct config
var config = null;
switch (process.env.STAGE){
case "DOCKER":
config = config_docker;
break;
case "LOCAL":
config = config_local;
break;
case "DEVEL":
config = config_devel;
break;
default:
config = config_devel;
}
// Build connection string
config.db.connectionString = config.db.server + "/" + config.db.database
module.exports = config;