aheart / espresso
Silex wired with radioactive caffeine.
v0.2.1
2012-09-24 18:11 UTC
Requires
- php: >=5.3.3
- react/http: 0.2.*
- silex/silex: 1.0.*
This package is not auto-updated.
Last update: 2025-03-19 10:15:50 UTC
README
React/Espresso is a proof-of-concept microframework that integrates Silex with React/Http.
Install
The recommended way to install react/espresso is through composer.
{ "require": { "minimum-stability": "dev", "aheart/espresso": "0.2.*" } }
Example
$app = new React\Espresso\Application(); $app->get('/', function ($request, $response) { return 'Hello World'; }); $app->get('/hello/{name}', function($name) use($app) { return 'Hello '.$app->escape($name); }); $app->error(function (\Exception $e, $code) use ($app) { return 'Page not found'; }); $stack = new React\Espresso\Stack($app); $stack->listen(1337);
Tests
To run the test suite, you need PHPUnit.
$ phpunit
License
MIT, see LICENSE.