From dad05688e0ad44a86f04e6048114e5627663f636 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Sun, 1 Mar 2020 21:17:36 +0000 Subject: [PATCH] Expose parameters for #6 --- src/Command/RunCommand.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/Command/RunCommand.php b/src/Command/RunCommand.php index 33f4008..7cfee3e 100644 --- a/src/Command/RunCommand.php +++ b/src/Command/RunCommand.php @@ -8,10 +8,11 @@ class RunCommand extends AbstractWebEngineCommand { public function run(ArgumentValueList $arguments = null):void { $port = $arguments->get("port", 8080); + $bind = $arguments->get("bind", "0.0.0.0"); $this->executeScript( $arguments, - ["serve", "--port", $port], + ["serve", "--port", $port, "--bind", $bind], ["build", "--default", "vendor/phpgt/webengine/build.default.json", "--watch"], ["cron", "--now", "--watch"] ); @@ -42,6 +43,17 @@ public function getRequiredParameterList():array { /** @return Parameter[] */ public function getOptionalParameterList():array { - return []; + return [ + new Parameter( + true, + "port", + "p" + ), + new Parameter( + true, + "bind", + "b" + ), + ]; } } \ No newline at end of file