diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2018-11-16 03:25:35 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2018-11-16 03:25:35 +0900 |
| commit | bf3fee4481585fffe2b01c40fbe5851f42d4c55e (patch) | |
| tree | 41c43621fec7b55541edce2ec0a2864e4c375354 /src | |
| parent | Check Node.js version (#3245) (diff) | |
| download | sharkey-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.ts | 5 |
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); |