Skip to content

Commit

Permalink
Expose parameters for #6
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Mar 1, 2020
1 parent 3ec1cbf commit dad0568
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/Command/RunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
);
Expand Down Expand Up @@ -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"
),
];
}
}

0 comments on commit dad0568

Please sign in to comment.