cakephp/cakephp — pull request #714 by shin1x1 (2012-07-12 17:32:20+00:00)
Title: Added ServerShell for PHP Built-in Server into 2.3 branch.

This pull request is from #713 .

Hi, I would propose adding new Shell Command.It is ServerShell.

ServerShell provides a httpd server for CakePHP application without other httpd server(Apache, nginx etc).

It is use PHP CLI build-in server.

Use case is below.

### 1. default (http://localhost/)

$ cd /path/to/app
$ ./Console/cake server

Welcome to CakePHP v2.3.0-dev Console
---------------------------------------------------------------
App : app
Path: /path/to/app/
DocumentRoot: /path/to/app/webroot
---------------------------------------------------------------
built-in server is running in http://localhost/

### 2. specify ListenPort (http://localhost:8000/)

$ ./Console/cake server -p 8000

Welcome to CakePHP v2.3.0-dev Console
---------------------------------------------------------------
App : app
Path: /path/to/app/
DocumentRoot: /path/to/app/webroot
---------------------------------------------------------------
built-in server is running in http://localhost:8000/

### 3. usage

$ ./Console/cake -h

Welcome to CakePHP v2.3.0-dev Console
---------------------------------------------------------------
App : app
Path: /path/to/app/
DocumentRoot: /path/to/app/webroot
---------------------------------------------------------------
PHP Built-in Server for CakePHP
[WARN] Don't use this at the production environment

Usage:
cake server [-h] [-v] [-q] [-H] [-p] [-d]

Options:

--help, -h Display this help.
--verbose, -v Enable verbose output.
--quiet, -q Enable quiet output.
--host, -H ServerHost
--port, -p ListenPort
--document_root, -d DocumentRoot

### 4. PHP 5.3 or lower

$ ./Console/cake server

Welcome to CakePHP v2.3.0-dev Console
---------------------------------------------------------------
App : app
Path: /path/to/app/
DocumentRoot: /path/to/app/webroot
---------------------------------------------------------------
This command is available on PHP5.4 or above