Commit
a09730465235a0311e8c3c5f0e33ddc049f78f46
bisa dicoba
Showing
3 changed files
with
22 additions
and
1 deletions
Side-by-side Diff
... |
... |
@@ -0,0 +1,11 @@ |
|
1 |
+{ |
|
2 |
+ "server_options": { |
|
3 |
+ "port": 32185 |
|
4 |
+ }, |
|
5 |
+ "hosts": [ |
|
6 |
+ { |
|
7 |
+ "host": "trxmon.reload97.com", |
|
8 |
+ "target": "http://172.23.3.52:14298" |
|
9 |
+ } |
|
10 |
+ ] |
|
11 |
+} |
... |
... |
@@ -0,0 +1,7 @@ |
|
1 |
+var config = require(__dirname + '/config.json'); |
|
2 |
+var redbird = require('redbird')(config.server_options); |
|
3 |
+ |
|
4 |
+var hostsCount = config.hosts.length; |
|
5 |
+for (var i=0; i < hostsCount; i++) { |
|
6 |
+ redbird.register(config.hosts[i].host, config.hosts[i].target); |
|
7 |
+} |
... |
... |
@@ -15,5 +15,8 @@ |
15
|
15 |
"r97" |
16
|
16 |
], |
17
|
17 |
"author": "Adhidarma Hadiwinoto <me@adhisimon.org>", |
18
|
|
- "license": "ISC" |
|
18 |
+ "license": "ISC", |
|
19 |
+ "dependencies": { |
|
20 |
+ "redbird": "^0.5.6" |
|
21 |
+ } |
19
|
22 |
} |