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()

Implementation of 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 45
Built in http server commands.


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

  $items['runserver'] = array(
    'description' => 'Runs a lightweight 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.',
    'options' => array(
      'server' => 'Which http server to use - either: "cgi" for a CGI based httpserver (default, requires php 5.3 and php-cgi binary) or "builtin" for php 5.4 built in http server.',
      'php-cgi' => 'Name of the php-cgi binary. If it is not on your current $PATH you should include the full path. You can include command line parameters to pass into php-cgi.',
      '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).',
      'browser' => 'If opening a web browser, which browser to user (defaults to operating system default).',
      '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 --php-cgi=php5-cgi --dns localhost:8888/user' => 'Start runserver on localhost (using rDNS to determine binding IP), port 8888, and open /user in browser. Use "php5-cgi" as the php-cgi binary.',
      '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 --server=builtin :9000/admin' => 'Start builtin php 5.4 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;