-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
52 lines (47 loc) · 1.26 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
var auth = require('./config.auth');
var envs = {
development: {
database: {
host: auth.development.database.host,
port: 5984,
name: "development",
auth: auth.development.database.auth
},
lastfm: {
api_key: auth.development.lastfm.api_key
},
user_agent: auth.development.user_agent
},
production: {
database: {
host: auth.production.database.host,
port: 5984,
name: "production",
auth: auth.production.database.auth
},
lastfm: {
api_key: auth.production.lastfm.api_key
},
user_agent: auth.production.user_agent
},
test: {
database: {
host: auth.production.database.host,
port: 5984,
name: "test",
auth: auth.production.database.auth
},
lastfm: {
api_key: auth.production.lastfm.api_key
},
user_agent: auth.production.user_agent
}
}
module.exports = (function() {
var env = envs[process.env.NODE_ENV];
env.database.url = function() {
var db = env.database;
return "https://" + db.auth + "@" + db.host + "/";
};
return env;
})();