Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit 5707f41 Apr 5, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information. update Apr 5, 2019

Zend Expressive integration for roadrunner

The entrypoint file can look like bellow:


ini_set('display_errors', 'stderr');

require 'vendor/autoload.php';

$relay = new Spiral\Goridge\StreamRelay(STDIN, STDOUT);
$psr7 = new Spiral\RoadRunner\PSR7Client(new Spiral\RoadRunner\Worker($relay));

$app = (function () {
    $container = require 'config/container.php';
    $app = $container->get(\Zend\Expressive\Application::class);
    $factory = $container->get(\Zend\Expressive\MiddlewareFactory::class);
    (require 'config/pipeline.php')($app, $factory, $container);
    (require 'config/routes.php')($app, $factory, $container);

    return $app;

while ($req = $psr7->acceptRequest()) {
    try {
        $response = $app->handle($req);
    } catch (\Throwable $e) {
You can’t perform that action at this time.