Commit 1fbcb90950b989aa4951da892e1e8fcd4a01d9aa
1 parent
43126c291a
Exists in
master
Add config.sample.json
Showing 2 changed files with 12 additions and 1 deletions Inline Diff
config.sample.json
File was created | 1 | { | |
2 | "handler_name": "DUMMY2022", | ||
3 | "pull_interval_ms": 1000, | ||
4 | "apiserver": { | ||
5 | "apikey": "PLEASE_CHANGE_ME", | ||
6 | "port": 12602, | ||
7 | "url": "http://localhost:12602/apikey/PLEASE_CHANGE_ME" | ||
8 | }, | ||
9 | "products": [], | ||
10 | "remote_products": {} | ||
11 | } | ||
12 |
index.js
1 | process.chdir(__dirname); | 1 | process.chdir(__dirname); |
2 | 2 | ||
3 | const fs = require('fs'); | 3 | const fs = require('fs'); |
4 | 4 | ||
5 | const config = require('komodo-sdk/config'); | 5 | const config = require('komodo-sdk/config'); |
6 | 6 | ||
7 | global.KOMODO_LOG_LABEL = `KOMODO-GW@${config.handler_name || 'DUMMY'}`; | 7 | global.KOMODO_LOG_LABEL = `KOMODO-GW@${config.handler_name || 'DUMMY2022'}`; |
8 | 8 | ||
9 | require('komodo-sdk/api-server'); | 9 | require('komodo-sdk/api-server'); |
10 | const sdNotify = require('komodo-sdk/sd-notify'); | 10 | const sdNotify = require('komodo-sdk/sd-notify'); |
11 | 11 | ||
12 | const pullgw = require('komodo-sdk/gateway/pull'); | 12 | const pullgw = require('komodo-sdk/gateway/pull'); |
13 | const partner = require('./lib/partner'); | 13 | const partner = require('./lib/partner'); |
14 | 14 | ||
15 | pullgw.setPartner(partner); | 15 | pullgw.setPartner(partner); |
16 | 16 | ||
17 | fs.writeFileSync('pid.txt', process.pid.toString()); | 17 | fs.writeFileSync('pid.txt', process.pid.toString()); |
18 | 18 | ||
19 | sdNotify(); | 19 | sdNotify(); |
20 | 20 |