Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/razonyang/yii-runner-swoole
- Owner: razonyang
- License: bsd-3-clause
- Created: 2022-09-04T05:11:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-17T08:09:49.000Z (over 2 years ago)
- Last Synced: 2024-04-13T22:26:23.173Z (10 months ago)
- Topics: swoole, yii, yii-runner, yii-swoole, yii3
- Language: PHP
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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,
],
],
],
];
```