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

Commit

Permalink
Updated standalone example to pipe routing/dispatch middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed Jan 27, 2016
1 parent 4e0fe3b commit fcad6cf
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/book/getting-started/standalone.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ $app->get('/', function ($request, $response, $next) {
return $response;
});

$app->pipeRoutingMiddleware();
$app->pipeDispatchMiddleware();
$app->run();
```

Expand All @@ -77,6 +79,21 @@ $app->run();
> your bootstrap is invoked for unknown URLs. We'll cover that in a later
> chapter.
> ### Routing and dispatching
>
> Note the lines from the above:
>
> ```php
> $app->pipeRoutingMiddleware();
> $app->pipeDispatchMiddleware();
> ```
>
> Expressive's `Application` class provides two separate middlewares, one for
> routing, and one for dispatching middleware matched by routing. This allows
> you to slip in validations between the two activities if desired. They are
> not automatically piped to the application, however, to allow exactly that
> situation, which means they must be piped manually.
## 5. Start a web server
Since we're just testing out the basic functionality of our application, we'll
Expand Down

0 comments on commit fcad6cf

Please sign in to comment.