Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Document the composer serve command
Browse files Browse the repository at this point in the history
This follows on from zendframework/zend-expressive-skeleton#41, demonstrating
how to use the built-in `composer serve` command from the installer, as well as
how to create the command in standalone installations.
  • Loading branch information
weierophinney committed Dec 9, 2015
1 parent e57054d commit 921ff92
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/book/quick-start-skeleton.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ server](http://php.net/manual/en/features.commandline.webserver.php).
From the project root directory, execute the following:

```bash
$ php -S 0.0.0.0:8080 -t public/
$ composer serve
```

This starts up a web server on localhost port 8080; browse to
Expand Down
17 changes: 17 additions & 0 deletions doc/book/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,23 @@ $ php -S 0.0.0.0:8080 -t public/
This starts up a web server on localhost port 8080; browse to
http://localhost:8080/ to see if your application responds correctly!

> ### Tip: Serve via Composer
>
> To simplify starting up a local web server, try adding the following to your
> `composer.json`:
>
> ```json
> "scripts": {
> "server": "php -S 0.0.0.0:8080 -t public/
> }
> ```
>
> Once you've added that, you can fire up the web server using:
>
> ```bash
> $ composer serve
> ```
## Next steps
At this point, you have a working zend-expressive application, that responds to
Expand Down
7 changes: 6 additions & 1 deletion doc/book/usage-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ We assume also that:
> ```
>
> from the application root to start up a web server running on port 8080, and
> then browse to http://localhost:8080
> then browse to http://localhost:8080/. If you used the Expressive installer,
> the following is equivalent:
>
> ```bash
> $ composer serve
> ```
> ## Setting up autoloading for the Application namespace
>
Expand Down

0 comments on commit 921ff92

Please sign in to comment.