diff options
author | Wolfy-J <[email protected]> | 2018-07-23 22:33:06 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2018-07-23 22:33:06 +0300 |
commit | 7722c25c4dee179f6db7c696662d16e063d815f9 (patch) | |
tree | 8768b36dda597ef0e00f3c2f52d75d20afac5287 | |
parent | c16f7384829d03bf7f7d24d538dc21be65e76698 (diff) |
Update README.md
-rw-r--r-- | README.md | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -119,13 +119,14 @@ Where `psr-worker.php`: ```php ini_set('display_errors', 'stderr'); +require 'vendor/autoload.php'; $relay = new Spiral\Goridge\StreamRelay(STDIN, STDOUT); $psr7 = new Spiral\RoadRunner\PSR7Client(new Spiral\RoadRunner\Worker($relay)); while ($req = $psr7->acceptRequest()) { try { - $resp = new \Zend\Diactoros\Response() + $resp = new \Zend\Diactoros\Response(); $resp->getBody()->write("hello world"); $psr7->respond($resp); @@ -135,6 +136,8 @@ while ($req = $psr7->acceptRequest()) { } ``` +Run `composer require spiral/roadrunner` to load php library. + > Check how to init relay [here](./php-src/tests/client.php). Working with RoadRunner service: |