Skip to content

Commit

Permalink
Merge pull request #55 from clue-labs/http-example
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus authored Aug 7, 2021
2 parents 02f71c1 + 3b2321a commit 77ca304
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions theme/homepage.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<div class="welcome__example">
{% markdown %}
```php
$server = new React\Http\Server(function (Psr\Http\Message\ServerRequestInterface $request) {
$http = new React\Http\HttpServer(function (Psr\Http\Message\ServerRequestInterface $request) {
return new React\Http\Message\Response(
200,
array(
Expand All @@ -51,8 +51,8 @@ $server = new React\Http\Server(function (Psr\Http\Message\ServerRequestInterfac
);
});

$socket = new React\Socket\Server('127.0.0.1:8080');
$server->listen($socket);
$socket = new React\Socket\SocketServer('127.0.0.1:8080');
$http->listen($socket);

echo "Server running at http://127.0.0.1:8080" . PHP_EOL;
```
Expand Down

0 comments on commit 77ca304

Please sign in to comment.