GitHub - friends-of-reactphp/espresso: Silex wired with radioactive caffeine.
React/Espresso is a proof-of-concept microframework that integrates Silex with React/Http.
$app = new React\Espresso\Application(); $app->get('/', function ($request, $response) { $response->writeHead(200, array('Content-Type' => 'text/plain')); $response->end("Hello World\n"); }); $app->get('/favicon.ico', function ($request, $response) { $response->writeHead(204); $response->end(); }); $app->get('/humans.txt', function ($request, $response) { $response->writeHead(200, array('Content-Type' => 'text/plain')); $response->end("I believe you are a humanoid robot.\n"); }); $stack = new React\Espresso\Stack($app); $stack->listen(1337);
To run the test suite, you need PHPUnit.
MIT, see LICENSE.