Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Swoole support for Expressive applications

License

NotificationsYou must be signed in to change notification settings

zendframework/zend-expressive-swoole

Repository abandoned 2019-12-31

This repository has moved tomezzio/mezzio-swoole.

Build StatusCoverage Status

This library provides the support ofSwoole intoanExpressive application. This means you canexecute your Expressive application using Swoole directly from the command line.

Installation

Run the following to install this library:

$ composer require zendframework/zend-expressive-swoole

Configuration

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        ],    ],]);

Expressive skeleton 3.1.0 and later

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'sConfigProvider, as the skeleton supports it out of the box.

You will only need to provide any additional configuration of the HTTP server.

Execute

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 start

Documentation

Browse the documentation online athttps://docs.zendframework.com/zend-expressive-swoole/

Support

About

Swoole support for Expressive applications

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors14


[8]ページ先頭

©2009-2025 Movatter.jp