-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.js
59 lines (52 loc) · 1.52 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
/*
* This file is part of the mintunitish/Uptime Monitor.
*
* Copyright (c) 2018, Nitish Kumar <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
*
* Created By: Nitish Kumar on 10/27/2018 11:28 PM
*/
let environments ={};
environments.staging = {
'httpPort' : 3000,
'httpsPort' : 3001,
'envName' : 'staging',
'secret' : 'thisIsASecret',
'maxChecks' : 5,
'twilio' : {
'accountSid' : '',
'authToken' : '',
'fromPhone' : ''
},
'templateGlobals' : {
'appName' : 'Uptime Monitor',
'companyName' : 'Awesome People Inc.',
'yearCreated' : '2018',
'baseUrl' : 'http://localhost:3000/'
}
};
environments.production = {
'httpPort' : 5000,
'httpsPort' : 5001,
'envName' : 'production',
'secret' : 'someSecret',
'maxChecks' : 10,
'twilio' : {
'accountSid' : '',
'authToken' : '',
'fromPhone' : ''
},
'templateGlobals' : {
'appName' : 'Uptime Monitor',
'companyName' : 'Awesome People Inc.',
'yearCreated' : '2018',
'baseUrl' : 'http://localhost:5000/'
}
};
const currentEnvironment = typeof(process.env.NODE_ENV) == 'string' ? process.env.NODE_ENV.toLowerCase() : '';
// defaults to staging
let environmentToExport = typeof(environments[currentEnvironment]) == 'object' ? environments[currentEnvironment] : environments.staging;
module.exports = environmentToExport;