Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
kohkimakimoto committed Feb 7, 2014
1 parent f8164e5 commit 7f1387e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Altax/Command/ServerCommand.php
Expand Up @@ -8,7 +8,11 @@ class ServerCommand extends \Altax\Command\Command
{
protected function configure()
{
//$this->getConfig();
$config = $this->getTaskConfig();

$host = isset($config["host"]) ? $config["host"] : '0.0.0.0';
$port = isset($config["port"]) ? $config["port"] : 3000;
$script = isset($config["script"]) ? $config["script"] : "";

$this
->setDescription("Runs php builtin server.")
Expand All @@ -17,20 +21,20 @@ protected function configure()
null,
InputOption::VALUE_OPTIONAL,
'The host address to serve the application on.',
'0.0.0.0'
$host
)
->addOption(
'port',
null,
InputOption::VALUE_OPTIONAL,
'The port to serve the application on.',
3000
$port
)
->addArgument(
'script',
InputArgument::OPTIONAL,
'Router script of the server.',
''
$script
)
;
}
Expand Down

0 comments on commit 7f1387e

Please sign in to comment.