vn-rfid/server.js

16 lines
313 B
JavaScript
Raw Normal View History

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();