From 0eae76168f2d4680287bcb8b407685bffc5a8bd1 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Fri, 16 Nov 2018 03:25:35 +0900 Subject: [PATCH] Check the port is configured (#3251) --- src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.ts b/src/index.ts index 91d998f19..4ecc2c016 100644 --- a/src/index.ts +++ b/src/index.ts @@ -140,6 +140,11 @@ async function init(): Promise { configLogger.succ('Loaded'); + if (config.port == null) { + Logger.error('The port is not configured. Please configure port.'); + process.exit(1); + } + if (process.platform === 'linux' && !isRoot() && config.port < 1024) { Logger.error('You need root privileges to listen on port below 1024 on Linux'); process.exit(1);