From 762a4dbd5cb2297a2f849f448f78f4837a03ca07 Mon Sep 17 00:00:00 2001 From: Marcel Pociot Date: Tue, 2 Jun 2020 21:10:03 +0200 Subject: [PATCH] wip --- app/Commands/ServeCommand.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Commands/ServeCommand.php b/app/Commands/ServeCommand.php index dcea545..7d33c3c 100644 --- a/app/Commands/ServeCommand.php +++ b/app/Commands/ServeCommand.php @@ -8,7 +8,7 @@ use React\EventLoop\LoopInterface; class ServeCommand extends Command { - protected $signature = 'serve {hostname=localhost} {host=0.0.0.0} {--validateAuthTokens}'; + protected $signature = 'serve {hostname=localhost} {host=0.0.0.0} {--validateAuthTokens} {--port=8080}'; protected $description = 'Start the shaft server'; @@ -18,12 +18,13 @@ class ServeCommand extends Command $loop = app(LoopInterface::class); $loop->futureTick(function () { - $this->info("Expose server running."); + $this->info("Expose server running on port ".$this->option('port')."."); }); (new Factory()) ->setLoop($loop) ->setHost($this->argument('host')) + ->setPort($this->option('port')) ->setHostname($this->argument('hostname')) ->validateAuthTokens($this->option('validateAuthTokens')) ->createServer()