react/espresso

Silex wired with radioactive caffeine.

v0.2.1 2012-09-24 18:11 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 3b9f922fa31eb8573a54c3dce0090de73de95d2e

microframework

This package is auto-updated.

Last update: 2026-06-05 21:58:09 UTC


README

React/Espresso is a proof-of-concept microframework that integrates Silex with React/Http.

👁 Build Status

Install

The recommended way to install react/espresso is through composer.

{
 "require": {
 "minimum-stability": "dev",
 "react/espresso": "0.2.*"
 }
}

Example

$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);

Tests

To run the test suite, you need PHPUnit.

$ phpunit

License

MIT, see LICENSE.