2023-01-24 09:11:58 +00:00
|
|
|
import stream from './src/stream.js';
|
2023-01-24 14:10:39 +00:00
|
|
|
import getConfig from './util/getConfig.js';
|
|
|
|
import logger from 'pino';
|
|
|
|
console.logger = logger();
|
2023-01-24 09:11:58 +00:00
|
|
|
|
|
|
|
function main() {
|
2023-01-24 14:10:39 +00:00
|
|
|
const conf = getConfig();
|
2023-01-24 09:11:58 +00:00
|
|
|
|
2023-01-24 14:10:39 +00:00
|
|
|
stream(conf, e => {
|
|
|
|
console.logger.error(e);
|
|
|
|
setTimeout(main, conf.reconnectInterval);
|
|
|
|
});
|
2023-01-24 09:11:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
main();
|