Skip to content

Commit

Permalink
[ReactPHP] Show any errors while handling requests
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Jan 17, 2025
1 parent f22bbb6 commit 087496e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frameworks/PHP/reactphp/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
require_once __DIR__.'/app.php';

$server = new HttpServer(requestHandler());
$server->on('error', function (\Throwable $error) {
echo $error->getMessage(), PHP_EOL;
});
$socket = new SocketServer('0.0.0.0:8080');
$server->listen($socket);

Expand Down

0 comments on commit 087496e

Please sign in to comment.