-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
41 lines (39 loc) · 848 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
/**
* Environment-based config vars
*/
var settings = {
'development': {
'server': {
'port': process.env.PORT || 8080,
'host': 'http://localhost'
},
'database': {
'url': 'mongodb://localhost/whfnp-content-dev'
}
},
'test': {
'server': {
'port': process.env.PORT || 3000,
'host': 'http://localhost'
},
'database': {
'url': 'mongodb://localhost/whfnp-content-test'
}
},
'production': {
'server': {
'port': process.env.PORT || 8080,
'host': 'http://localhost'
},
'database': {
'url': 'mongodb://localhost/whfnp-content'
}
}
}
/**
* Determine the config based on env
*/
var node_env = process.env.NODE_ENV || 'development';
var conf = settings[node_env];
conf.url = conf.server.host + ':' + conf.server.port;
module.exports = conf;