function runserver_drush_command

8.0.x runserver_drush_command()
6.x runserver_drush_command()
7.x runserver_drush_command()
5.x runserver_drush_command()
master runserver_drush_command()

Implements hook_drush_command().

1 call to runserver_drush_command()
drush_core_quick_drupal_options in commands/core/
Include options and engines for core-quick-drupal command, aggregated from other command options that are available. We prefix option descriptons, to make the long list more navigable.


commands/runserver/, line 28
Built in http server commands.


function runserver_drush_command() {
  $items = array();

  $items['runserver'] = array(
    'description' => 'Runs PHP\'s built-in http server for development.',
    'arguments' => array(
      'addr:port/path' => 'Host IP address and port number to bind to and path to open in web browser. Format is addr:port/path, default, all elements optional. See examples for shorthand. Only opens a browser if a path is specified.',
    'options' => array(
      'variables' => 'Key-value array of variables to override in the $conf array for the running site. By default disables drupal_http_request_fails to avoid errors on Windows (which supports only one connection at a time). Comma delimited list of name=value pairs (or array in drushrc).',
      'default-server' => 'A default addr:port/path to use for any values not specified as an argument.',
      'user' => 'If opening a web browser, automatically log in as this user (user ID or username). Default is to log in as uid 1.',
      'browser' => 'If opening a web browser, which browser to user (defaults to operating system default). Use --no-browser to avoid opening a browser.',
      'dns' => 'Resolve hostnames/IPs using DNS/rDNS (if possible) to determine binding IPs and/or human friendly hostnames for URLs and browser.',
    'aliases' => array('rs'),
    'examples' => array(
      'drush rs 8080' => 'Start runserver on, port 8080.',
      'drush rs' => 'Start runserver on, port 80.',
      'drush rs [::1]:80' => 'Start runserver on IPv6 localhost ::1, port 80.',
      'drush rs --dns localhost:8888/user' => 'Start runserver on localhost (using rDNS to determine binding IP), port 8888, and open /user in browser.',
      'drush rs /' => 'Start runserver on default IP/port (, port 8888), and open / in browser.',
      'drush rs --default-server= -' => 'Use a default (would be specified in your drushrc) that starts runserver on port 8080, and opens a browser to the front page. Set path to a single hyphen path in argument to prevent opening browser for this session.',
      'drush rs :9000/admin' => 'Start runserver on, port 9000, and open /admin in browser. Note that you need a colon when you specify port and path, but no IP.',
  return $items;