From c8ecdb77332f4840f130e340a69c33280affc19c Mon Sep 17 00:00:00 2001 From: erikn69 Date: Mon, 14 Feb 2022 11:12:27 -0500 Subject: [PATCH] Use port on websockets.php as default --- src/Console/Commands/StartServer.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Console/Commands/StartServer.php b/src/Console/Commands/StartServer.php index abe1d075a6..60c3344b28 100644 --- a/src/Console/Commands/StartServer.php +++ b/src/Console/Commands/StartServer.php @@ -22,7 +22,7 @@ class StartServer extends Command */ protected $signature = 'websockets:serve {--host=0.0.0.0} - {--port=6001} + {--port=} {--disable-statistics : Disable the statistics tracking.} {--statistics-interval= : The amount of seconds to tick between statistics saving.} {--debug : Forces the loggers to be enabled and thereby overriding the APP_DEBUG setting.} @@ -254,7 +254,8 @@ protected function configureConnectionLogger() */ protected function startServer() { - $this->info("Starting the WebSocket server on port {$this->option('port')}..."); + $port = $this->option('port') ?: config('websockets.dashboard.port', 6001); + $this->info("Starting the WebSocket server on port {$port}..."); $this->buildServer(); @@ -269,7 +270,7 @@ protected function startServer() protected function buildServer() { $this->server = new ServerFactory( - $this->option('host'), $this->option('port') + $this->option('host'), $this->option('port') ?: config('websockets.dashboard.port', 6001) ); if ($loop = $this->option('loop')) {