Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/razonyang/yii-runner-swoole

Yii Swoole Application Runner
https://github.com/razonyang/yii-runner-swoole

swoole yii yii-runner yii-swoole yii3

Last synced: about 1 month ago
JSON representation

Yii Swoole Application Runner

Awesome Lists containing this project

README

        

# Yii Swoole Application Runner

[![Latest Stable Version](https://poser.pugx.org/razonyang/yii-runner-swoole/v/stable.png)](https://packagist.org/packages/razonyang/yii-runner-swoole)
[![Total Downloads](https://poser.pugx.org/razonyang/yii-runner-swoole/downloads.png)](https://packagist.org/packages/razonyang/yii-runner-swoole)
[![Build Status](https://github.com/razonyang/yii-runner-swoole/workflows/build/badge.svg)](https://github.com/razonyang/yii-runner-swoole/actions)
[![Coverage Status](https://coveralls.io/repos/github/razonyang/yii-runner-swoole/badge.svg?branch=main)](https://coveralls.io/github/razonyang/yii-runner-swoole?branch=main)

The Swoole adapter for [Yii Runner](https://github.com/yiisoft/yii-runner), built on top of Swoole coroutine.

## Installation

```bash
composer require razonyang/yii-runner-swoole --prefer-dist
```

## Entrypoint

```php
run();
```

Start the server.

```bash
php server.php
```

## Configuration

```php
[
'pool' => [
'workerNumber' => 4,
],
'server' => [
'host' => '0.0.0.0',
'port' => 9501,
],
'coroutine' => [
'options' => [
// See https://wiki.swoole.com/#/coroutine/coroutine?id=set.
// 'log_level' => SWOOLE_LOG_TRACE,
// 'trace_flags' => SWOOLE_TRACE_ALL,
],
],
],
];
```