summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2018-11-16 03:25:35 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2018-11-16 03:25:35 +0900
commitbf3fee4481585fffe2b01c40fbe5851f42d4c55e (patch)
tree41c43621fec7b55541edce2ec0a2864e4c375354 /src
parentCheck Node.js version (#3245) (diff)
downloadsharkey-bf3fee4481585fffe2b01c40fbe5851f42d4c55e.tar.gz
sharkey-bf3fee4481585fffe2b01c40fbe5851f42d4c55e.tar.bz2
sharkey-bf3fee4481585fffe2b01c40fbe5851f42d4c55e.zip
Check the port is configured (#3251)
Diffstat (limited to 'src')
-rw-r--r--src/index.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/index.ts b/src/index.ts
index 91d998f191..4ecc2c016f 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -140,6 +140,11 @@ async function init(): Promise<Config> {
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);