public function run()
    {
        $request = ServerRequestFactory::fromGlobals();
        $this->pipeline->build()
            ->pipe(new Stage(function (ResponseInterface $response = null) {
                $emitter = new SapiEmitter;
                if (is_null($response)) {
                    throw new Exception(404);
                }
                return $emitter->emit($response);
            }))
            ->process($request);
    }