feat: make it fake data

This commit is contained in:
2019-01-28 14:25:59 -07:00
parent 7b5ad0ffc6
commit e94c6f5d49
4 changed files with 213 additions and 63 deletions

View File

@@ -5,6 +5,9 @@ const runInterval = require('interval-promise');
const mod = require('../src/index.mjs').default;
const logger = require('../src/lib/logger.mjs').default;
const esHost = process.env.ELASTICSEARCH_HOST || 'localhost';
const esPort = process.env.ELASTICSEARCH_PORT || '9200';
const { index, interval, lat, lon, radius, ...elasticsearch } = getopts(process.argv.slice(2), {
string: ['host', 'auth', 'log', 'index'],
alias: {
@@ -15,7 +18,7 @@ const { index, interval, lat, lon, radius, ...elasticsearch } = getopts(process.
t: 'interval',
},
default: {
host: 'localhost:9200',
host: `${esHost}:${esPort}`,
log: 'error',
index: 'adsb-data',
interval: 0,