Commit 54990eb8c5221aea79d6fea2304219582abca1d7
1 parent
3f3ca049aa
Exists in
master
Sample apiserver config
Showing 2 changed files with 5 additions and 0 deletions Inline Diff
config.sample.json
1 | { | 1 | { |
2 | "handler_name": "ST24", | 2 | "handler_name": "ST24", |
3 | "products": [ | 3 | "products": [ |
4 | "PLEASE_CHANGE_ME" | 4 | "PLEASE_CHANGE_ME" |
5 | ], | 5 | ], |
6 | "core_url": "http://127.0.0.1:32972/apikey/PLEASE_CHANGE_ME", | 6 | "core_url": "http://127.0.0.1:32972/apikey/PLEASE_CHANGE_ME", |
7 | "pull_interval_ms": 1000, | 7 | "pull_interval_ms": 1000, |
8 | "partner": { | 8 | "partner": { |
9 | "url": "https://PLEASE_CHANGE_ME:6789/", | 9 | "url": "https://PLEASE_CHANGE_ME:6789/", |
10 | "msisdn": "PLEASE_CHANGE_ME", | 10 | "msisdn": "PLEASE_CHANGE_ME", |
11 | "pin": "PLEASE_CHANGE_ME", | 11 | "pin": "PLEASE_CHANGE_ME", |
12 | "use_sslv3": false | 12 | "use_sslv3": false |
13 | }, | 13 | }, |
14 | "push_server": { | 14 | "push_server": { |
15 | "apikey": "PLEASE_CHANGE_ME", | 15 | "apikey": "PLEASE_CHANGE_ME", |
16 | "advice": { | 16 | "advice": { |
17 | "port": 14283, | 17 | "port": 14283, |
18 | "url": "http://PLEASE_CHANGE_ME:14283/apikey/PLEASE_CHANGE_ME/advice" | 18 | "url": "http://PLEASE_CHANGE_ME:14283/apikey/PLEASE_CHANGE_ME/advice" |
19 | } | 19 | } |
20 | }, | 20 | }, |
21 | "remote_products": { | 21 | "remote_products": { |
22 | "PLEASE_CHANGE_ME": "PLEASE_CHANGE_ME" | 22 | "PLEASE_CHANGE_ME": "PLEASE_CHANGE_ME" |
23 | }, | 23 | }, |
24 | "reverse_report_port": 27440, | 24 | "reverse_report_port": 27440, |
25 | "control_panel": { | 25 | "control_panel": { |
26 | "listen_port": 27441 | 26 | "listen_port": 27441 |
27 | }, | 27 | }, |
28 | "apiserver": { | ||
29 | "port": 27442, | ||
30 | "apikey": "PLEASE_CHANGE_ME" | ||
31 | }, | ||
28 | "advice_max_age_ms": 0, | 32 | "advice_max_age_ms": 0, |
29 | "advice_is_topuprequest": false, | 33 | "advice_is_topuprequest": false, |
30 | "responsecode_tag": null, | 34 | "responsecode_tag": null, |
31 | "do_not_verbose_log_report": true, | 35 | "do_not_verbose_log_report": true, |
32 | "force_all_to_pending": false | 36 | "force_all_to_pending": false |
33 | } | 37 | } |
34 | 38 |
index.js
1 | "use strict"; | 1 | "use strict"; |
2 | process.chdir(__dirname); | 2 | process.chdir(__dirname); |
3 | 3 | ||
4 | const apiserver = require('komodo-sdk/api-server'); | ||
4 | const pullgw = require('komodo-sdk/gateway/pull'); | 5 | const pullgw = require('komodo-sdk/gateway/pull'); |
5 | const partner = require('./lib/partner'); | 6 | const partner = require('./lib/partner'); |
6 | const reverseReport = require('./lib/reverse-report'); | 7 | const reverseReport = require('./lib/reverse-report'); |
7 | const adviceServer = require('komodo-sdk/gateway/advice-push-server'); | 8 | const adviceServer = require('komodo-sdk/gateway/advice-push-server'); |
8 | 9 | ||
9 | pullgw.setPartner(partner); | 10 | pullgw.setPartner(partner); |
10 | adviceServer.setPartner(partner); | 11 | adviceServer.setPartner(partner); |
11 | 12 |