Download the PHP package nigelgreenway/reactive-slim without Composer
On this page you can find all versions of the php package nigelgreenway/reactive-slim. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nigelgreenway/reactive-slim
More information about nigelgreenway/reactive-slim
Files in nigelgreenway/reactive-slim
Package reactive-slim
Short Description A bridge to use SlimPHP within ReactPHP
License
Informations about the package reactive-slim
README
Reactive Slim is a bridge where you can pass your Slim instance and reap the benefit's of ReactPHP's event driven, non-blocking I/O usage of PHP.
The implementation run's on PHP7.0 and makes good use of PHP's Scalar Type hints.
Installation
composer require nigelgreenway/reactive-slim
Usage
After creating your Slim Instance, pass it to the following construction:
Please see the examples for more information or run php ./example/app-dev-mode.php.
If are you are running via PHP locally, you are able to pass the following flags to customise both the host and the port:
-h 0.0.0.0 or --host=0.0.0.0 and -p 8686 or --port=8686
Restarting your ReactApp
There are 3 ways to restart your application (only tested on Linux - Solus, kernel 4.9.30-29.lts currently):
sh ./.tools/local-watchruns via local PHP installation (requiresinotify-toolsto be installed via package manager)sh ./.tools/reactorrun via local PHP installation and requires thereactor.config.jsonconfigsh ./.tools/docker-watchrun the app within a Docker container (requiresinotify-toolsto be installed via package manager)
Extra options
#withHost(<string>) - The default host URL is 0.0.0.0 but is overridden by passing a string as the parameter
#withPort(<int>) - The default port is 1337 but is overridden by passing an integer as the parameter
#withEnvironment(<int>) - The default is 0 which is the Production environment, the full options are:
ServerEnvironment::PRODUCTION(0)ServerEnvironment::STAGING(1)ServerEnvironment::TESTING(2)ServerEnvironment::DEVELOPMENT(3)
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
Contributing
Please see CONDUCT for details.
Security
If you discover any security related issues, please email :author_email instead of using the issue tracker.
Credits
- Nigel Greenway
- All Contributors
This has been created to plug two great packages together:
License
The MIT License (MIT). Please see License File for more information.
All versions of reactive-slim with dependencies
react/http Version ^0.6
slim/slim Version ^3.8.0
zendframework/zend-diactoros Version ^1.4