Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
const options = {};
if (argv && argv.port) {
options.port = argv.port;
}
if (argv && argv.method) {
options.method = argv.method;
}
if (argv && argv.configDir) {
options.configDir = argv.configDir;
}
try {
startServer(options);
} catch (error) {
const logger = new Logger();
logger.error(error);
}
break;
default:
client(command, argv);
break;
}
// Exit the process when stream closes from remote end.
process.stdin.on('close', () => {
process.exit(0);
});
process.exit(0);
}
});
const options = {};
if (argv && argv.port) {
options.port = argv.port;
}
if (argv && argv.method) {
options.method = argv.method;
}
if (argv && argv.configDir) {
options.configDir = argv.configDir;
}
try {
startServer(options);
} catch (error) {
const logger = new Logger();
logger.error(error);
}
break;
default:
client(command, argv);
break;
}
// Exit the process when stream closes from remote end.
process.stdin.on('close', () => {
process.exit(0);
});