- Notifications
You must be signed in to change notification settings - Fork4
A bridge to use SlimPHP within ReactPHP
License
NigelGreenway/reactive-slim
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Reactive Slim is a bridge where you can pass yourSlim instance and reap the benefit's ofReactPHP's event driven, non-blocking I/O usage of PHP.
The implementation run's on PHP7.0 and makes good use of PHP'sScalar Type hints.
composer require nigelgreenway/reactive-slim
After creating yourSlim Instance, pass it to the following construction:
(new \ReactiveSlim\Server($slimInstance)) ->run();
Please see theexamples for more information or runphp ./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
There are 3 ways to restart your application (only tested on Linux - Solus, kernel 4.9.30-29.lts currently):
sh ./.tools/local-watch
runs via local PHP installation (requiresinotify-tools
to be installed via package manager)sh ./.tools/reactor
run via local PHP installation and requires thereactor.config.json
configsh ./.tools/docker-watch
run the app within a Docker container (requiresinotify-tools
to be installed via package manager)
#withHost(<string>)
- The default host URL is0.0.0.0
but is overridden by passing a string as the parameter
#withPort(<int>)
- The default port is1337
but is overridden by passing an integer as the parameter
#withEnvironment(<int>)
- The default is0
which is theProduction
environment, the full options are:
ServerEnvironment::PRODUCTION
(0)ServerEnvironment::STAGING
(1)ServerEnvironment::TESTING
(2)ServerEnvironment::DEVELOPMENT
(3)
Please seeCHANGELOG for more information on what has changed recently.
$ composertest
Please seeCONTRIBUTING andCONDUCT for details.
If you discover any security related issues, please email :author_email instead of using the issue tracker.
This has been created to plug two great packages together:
The MIT License (MIT). Please seeLicense File for more information.
About
A bridge to use SlimPHP within ReactPHP
Topics
Resources
License
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.