Last active
May 14, 2018 19:14
-
-
Save seregazhuk/cce3ddffa810fa2a9ba343a44550ce58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function (ServerRequestInterface $request, \React\EventLoop\LoopInterface $loop) { | |
$childProcess = new \React\ChildProcess\Process('cat pages/index.html'); | |
$childProcess->start($loop); | |
return new React\Http\Response(200, ['Content-Type' => 'text/html'], $childProcess->stdout); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment