find available blinksticks or exit before server start

This commit is contained in:
Daniel Sommer 2022-02-25 22:58:47 +01:00
parent b3b123bea8
commit 714a89fb67

View file

@ -2,6 +2,7 @@ const logger = require('./libs/logger.js');
const util = require('./libs/util.js');
const cli = require('./libs/cli.js');
const server = require('./libs/server.js');
const blinkstick = require('./libs/blinkstick.js');
const packageJSON = require('./package');
const INTERRUPTS = ['SIGINT', 'SIGTERM'];
@ -24,6 +25,7 @@ async function main() {
if (await cli.handleArguments()) {
exit();
}
await blinkstick.findBlinkstick();
logger.info(await server.start());
server.handleRequests();
}