mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 09:23:09 +02:00
Check the port is configured (#3251)
This commit is contained in:
parent
766cae2299
commit
bf3fee4481
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue