function ServerCommand::configure
Same name in other branches
- 9 core/lib/Drupal/Core/Command/ServerCommand.php \Drupal\Core\Command\ServerCommand::configure()
- 10 core/lib/Drupal/Core/Command/ServerCommand.php \Drupal\Core\Command\ServerCommand::configure()
- 11.x core/lib/Drupal/Core/Command/ServerCommand.php \Drupal\Core\Command\ServerCommand::configure()
File
-
core/
lib/ Drupal/ Core/ Command/ ServerCommand.php, line 49
Class
- ServerCommand
- Runs the PHP webserver for a Drupal site for local testing/development.
Namespace
Drupal\Core\CommandCode
protected function configure() {
$this->setDescription('Starts up a webserver for a site.')
->addOption('host', NULL, InputOption::VALUE_OPTIONAL, 'Provide a host for the server to run on.', '127.0.0.1')
->addOption('port', NULL, InputOption::VALUE_OPTIONAL, 'Provide a port for the server to run on. Will be determined automatically if none supplied.')
->addOption('suppress-login', 's', InputOption::VALUE_NONE, 'Disable opening a login URL in a browser.')
->addUsage('--host localhost --port 8080')
->addUsage('--host my-site.com --port 80');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.