- Notifications
You must be signed in to change notification settings - Fork13
Swoole support for Expressive applications
License
zendframework/zend-expressive-swoole
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository has moved tomezzio/mezzio-swoole.
This library provides the support ofSwoole intoanExpressive application. This means you canexecute your Expressive application using Swoole directly from the command line.
Run the following to install this library:
$ composer require zendframework/zend-expressive-swoole
After installing zend-expressive-swoole, you will need to first enable thecomponent, and then optionally configure it.
We recommend adding a new configuration file to your autoload directory,config/autoload/swoole.local.php. To begin with, use the following contents:
<?phpuseZend\Expressive\Swoole\ConfigProvider;returnarray_merge((newConfigProvider())(), []);
The above will setup the Swoole integration for your application.
By default, Swoole executes the HTTP server with host127.0.0.1 on port8080. You can change these values via configuration. Assuming you have theabove, modify it to read as follows:
<?phpuseZend\Expressive\Swoole\ConfigProvider;returnarray_merge((newConfigProvider())(), ['zend-expressive-swoole' => ['swoole-http-server' => ['host' =>'insert hostname to use here','port' =>80,// use an integer value here ], ],]);
If you have built your application on the 3.1.0 or later version of theExpressive skeleton, you do not need to instantiate and invoke the package's
ConfigProvider, as the skeleton supports it out of the box.You will only need to provide any additional configuration of the HTTP server.
Once you have performed the configuration steps as outlined above, you can runan Expressive application with Swoole using the following command:
$ ./vendor/bin/zend-expressive-swoole start
Call the command without arguments to get a list of available commands, and usethehelp meta-argument to get help on individual commands:
$ ./vendor/bin/zend-expressive-swoolehelp startBrowse the documentation online athttps://docs.zendframework.com/zend-expressive-swoole/
About
Swoole support for Expressive applications
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors14
Uh oh!
There was an error while loading.Please reload this page.