- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.php
More file actions
Latest commit
18 lines (13 loc) · 414 Bytes
/
Copy pathexample.php
File metadata and controls
18 lines (13 loc) · 414 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
require'vendor/autoload.php';
$loop = React\EventLoop\Factory::create();
$socket = newReact\Socket\Server(9000, $loop);
$fastcgi = newGarveen\FastCgi\React($socket);
$fastcgi->onRequest = function (Psr\Http\Message\RequestInterface$request) {
returnnewGarveen\FastCgi\Response(
'200',
['x-powered-by' => 'garveen/fastcgi-react'],
'Hello World!'
);
};
$loop->run();