-
Notifications
You must be signed in to change notification settings - Fork 5
/
runconfig.js
43 lines (34 loc) · 1.02 KB
/
runconfig.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
/**
* Created by songjian on 2016/9/29.
*/
var fs = require('fs');
var stripJsonComments = require('strip-json-comments');
function loadJSONFile(file){
var json = fs.readFileSync(file).toString();
return JSON.parse(stripJsonComments(json));
}
var config = loadJSONFile('./ipconfig.json');
var dbHOST = config.dbIPconfig.HOST;
var dbPORT = config.dbIPconfig.PORT;
var gjHOST = config.gjIPconfig.HOST;
var gjPORT = config.gjIPconfig.PORT;
var esHOST = config.esIPconfig.HOST;
var esPORT = config.esIPconfig.PORT;
var jxHOST = config.jxIPconfig.HOST;
var jxPORT = config.jxIPconfig.PORT;
var lsHOST = config.lsIPconfig.HOST;
var lsPORT = config.lsIPconfig.PORT;
var oaHOST = config.oaIPconfig.HOST;
var oaPORT = config.oaIPconfig.PORT;
exports.dbHOST = dbHOST;
exports.dbPORT = dbPORT;
exports.gjHOST = gjHOST;
exports.gjPORT = gjPORT;
exports.esHOST = esHOST;
exports.esPORT = esPORT;
exports.jxHOST = jxHOST;
exports.jxPORT = jxPORT;
exports.lsHOST = lsHOST;
exports.lsPORT = lsPORT;
exports.oaHOST = oaHOST;
exports.oaPORT = oaPORT;