This repository has been archived by the owner on Jan 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathConfig.js
52 lines (50 loc) · 1.86 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 constants = {
mongoCon: 'mongodb://localhost:27017/maidsafe_logs',
projectRootDir: __dirname,
authPath: '../../../auth/master/gauth.json',
sanityCheckerDir: '../../../testnet_status_monitor/master',
paging: { max: 200 },
serverPort: 8080,
socketPort: 8081,
vaultLogsCount: 3,
minLengthForDecode: 6,
naPersonaId: 10,
networkHealthActionId: 17,
maxActionIdRange: 19,
connectionMapActionId: 19,
startActionId: 0,
stopActionId: 18,
maxClosest: 4,
nextBranchConfig: {
serverPort: 9080,
socketPort: 9081,
authPath: '../../../auth/next/gauth.json',
sanityCheckerDir: '../../../testnet_status_monitor/next'
}
};
if (process.env.PORT === constants.nextBranchConfig.serverPort.toString()) {
constants.mongoCon += '_next';
var branchConfig = constants.nextBranchConfig;
for (var key in branchConfig) {
if (branchConfig[key]) {
constants[key] = branchConfig[key];
}
}
}
var validationMsg = {
PERSONA_ID_NOT_A_NUMBER: 'PersonId is not a valid number',
ACTION_ID_NOT_A_NUMBER: 'Action Id is not valid number',
NETWORK_HEALTH_MUST_BE_INTEGER: 'Network health value must be an integer',
VAULTID_CANNOT_BE_EMPTY: 'vaultId can not be empty',
SESSIONID_CANNOT_BE_EMPTY: 'sessionId can not be empty',
VALUE_ONE_CANNOT_BE_EMPTY: 'value1 can not be empty',
ACTIONID_NOT_IN_RANGE: 'Action id is not in valid range (0 - ' + constants.maxActionIdRange + ')',
INVALID_DATE_FORMAT: 'Invalid date format',
FIELD_MANDATORY: ' field is mandatory',
VALUT_ADDED_OR_REMOVED_MUST_BE_PRESENT: 'Vault Added or Removed value must be present',
VAULT_ADDED_MUST_BE_STRING: 'Vault Added or Removed must be of string type',
VAULT_REMOVED_MUST_BE_STRING: 'Vault Added or Removed must be of string type',
CLOSEST_VAULTS_MUST_BE_ARRAY: 'closeGroupVaults must be an Array'
};
exports.Constants = constants;
exports.ValidationMsg = validationMsg;