Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions src/guide/tutorial/using-yii-with-roadrunner.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ That would download ready to use RoadRunner server `rr` binary.
First, we need to configure the server itself. Create `/.rr.yaml` and add the following config:

```yaml
version: '3'

server:
command: "php worker.php"
env:
YII_ENV: prod
YII_DEBUG: false

rpc:
listen: tcp://127.0.0.1:6001
Expand Down Expand Up @@ -142,13 +141,19 @@ Create `/worker.php`:

declare(strict_types=1);

use Yiisoft\Yii\Runner\RoadRunner\RoadRunnerApplicationRunner;
use App\Environment;
use Yiisoft\Yii\Runner\RoadRunner\RoadRunnerHttpApplicationRunner;

ini_set('display_errors', 'stderr');

require_once __DIR__ . '/preload.php';
require_once __DIR__ . '/src/bootstrap.php';

(new RoadRunnerApplicationRunner(__DIR__, $_ENV['YII_DEBUG'], $_ENV['YII_ENV']))->run();
(new RoadRunnerHttpApplicationRunner(
rootPath: __DIR__,
debug: Environment::appDebug(),
checkEvents: Environment::appDebug(),
environment: Environment::appEnv()
))->run();
```

## Starting a server
Expand Down