From 69c1f65e256c18b39b77a3946744b1b0938cdf78 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 9 Dec 2015 11:58:02 -0600 Subject: [PATCH 1/2] Added composer "serve" command - Executes `php -S 0.0.0.0:8080 -t public/`, starting up the built-in webserver from PHP. --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index e343629..3d49be9 100644 --- a/composer.json +++ b/composer.json @@ -47,6 +47,7 @@ ], "cs": "phpcs", "cs-fix": "phpcbf", + "serve": "php -S 0.0.0.0:8080 -t public/", "test": "phpunit" } } From 0908fe2aeff51a316827a7e5fb6c271870b5f720 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 9 Dec 2015 11:58:45 -0600 Subject: [PATCH 2/2] Updated README to use `composer serve` --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 606c5eb..23de4e8 100644 --- a/README.md +++ b/README.md @@ -46,5 +46,7 @@ After choosing and installing the packages you want, go to the `` and start PHP's built-in web server to verify installation: ```bash -$ php -S 0.0.0.0:8000 -t public/ +$ composer serve ``` + +You can then browse to http://localhost:8080.