/* eslint no-global-assign: 0 no-console: 0 */ require = require('esm')(module); const getopts = require('getopts'); const mod = require('../src/index.mjs').default; const { index, ...elasticsearch } = getopts(process.argv.slice(2), { string: ['host', 'log'], alias: { h: 'host', l: 'log', i: 'index', }, default: { host: 'localhost:9200', log: 'error', index: 'adsb-data', }, }); mod(index, { elasticsearch }).catch(err => { console.error(err); process.exit(1); });