Compare View
Commits (2)
Changes
Showing 3 changed files 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 | "apiserver": { | 32 | "advice_max_age_ms": 0, |
29 | "port": 27442, | 33 | "advice_is_topuprequest": false, |
30 | "apikey": "PLEASE_CHANGE_ME" | 34 | "responsecode_tag": null, |
31 | }, | 35 | "do_not_verbose_log_report": true, |
32 | "advice_max_age_ms": 0, | 36 | "force_all_to_pending": false |
33 | "advice_is_topuprequest": false, | 37 | } |
34 | "responsecode_tag": null, | 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 apiserver = require('komodo-sdk/api-server'); | 5 | const pullgw = require('komodo-sdk/gateway/pull'); |
5 | const pullgw = require('komodo-sdk/gateway/pull'); | 6 | const partner = require('./lib/partner'); |
6 | const partner = require('./lib/partner'); | 7 | const reverseReport = require('./lib/reverse-report'); |
7 | const reverseReport = require('./lib/reverse-report'); | 8 | const adviceServer = require('komodo-sdk/gateway/advice-push-server'); |
8 | const adviceServer = require('komodo-sdk/gateway/advice-push-server'); | 9 | |
9 | 10 | pullgw.setPartner(partner); | |
10 | pullgw.setPartner(partner); | 11 | adviceServer.setPartner(partner); |
11 | adviceServer.setPartner(partner); | 12 |
package.json
1 | { | 1 | { |
2 | "name": "komodo-gw-st24", | 2 | "name": "komodo-gw-st24", |
3 | "version": "2.1.1", | 3 | "version": "2.1.2", |
4 | "description": "Komodo Gateway to ST24 XML-RPC", | 4 | "description": "Komodo Gateway to ST24 XML-RPC", |
5 | "main": "index.js", | 5 | "main": "index.js", |
6 | "scripts": { | 6 | "scripts": { |
7 | "test": "mocha", | 7 | "test": "mocha", |
8 | "postversion": "git push && git push --tags" | 8 | "postversion": "git push && git push --tags" |
9 | }, | 9 | }, |
10 | "repository": { | 10 | "repository": { |
11 | "type": "git", | 11 | "type": "git", |
12 | "url": "git@gitlab.kodesumber.com:komodo/komodo-gw-st24.git" | 12 | "url": "git@gitlab.kodesumber.com:komodo/komodo-gw-st24.git" |
13 | }, | 13 | }, |
14 | "keywords": [ | 14 | "keywords": [ |
15 | "komodo", | 15 | "komodo", |
16 | "tektrans", | 16 | "tektrans", |
17 | "ppob", | 17 | "ppob", |
18 | "st24", | 18 | "st24", |
19 | "xmlrpc", | 19 | "xmlrpc", |
20 | "xml-rpc" | 20 | "xml-rpc" |
21 | ], | 21 | ], |
22 | "author": "Adhidarma Hadiwinoto <me@adhisimon.org>", | 22 | "author": "Adhidarma Hadiwinoto <me@adhisimon.org>", |
23 | "license": "ISC", | 23 | "license": "ISC", |
24 | "dependencies": { | 24 | "dependencies": { |
25 | "json-stringify-pretty-compact": "^1.1.0", | 25 | "json-stringify-pretty-compact": "^1.1.0", |
26 | "komodo-sdk": "git+http://gitlab.kodesumber.com/komodo/komodo-sdk.git", | 26 | "komodo-sdk": "git+http://gitlab.kodesumber.com/komodo/komodo-sdk.git", |
27 | "moment": "^2.22.1", | 27 | "moment": "^2.22.1", |
28 | "xmlrpc": "^1.3.2" | 28 | "xmlrpc": "^1.3.2" |
29 | }, | 29 | }, |
30 | "devDependencies": { | 30 | "devDependencies": { |
31 | "should": "^13.2.1" | 31 | "should": "^13.2.1" |
32 | } | 32 | } |
33 | } | 33 | } |
34 | 34 |