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

Document the composer serve command #223

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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