Need help with espresso?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

friends-of-reactphp
122 Stars 18 Forks MIT License 35 Commits 7 Opened issues

Description

Silex wired with radioactive caffeine.

Services available

!
?

Need anything else?

Contributors list

React/Espresso

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.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.