All Projects → NigelGreenway → reactive-slim

NigelGreenway / reactive-slim

Licence: MIT license
A bridge to use SlimPHP within ReactPHP

Programming Languages

PHP
23972 projects - #3 most used programming language
go
31211 projects - #10 most used programming language
shell
77523 projects
CSS
56736 projects

Projects that are alternatives of or similar to reactive-slim

php-server
Fine tuning on the PHP Built-in web server
Stars: ✭ 23 (-8%)
Mutual labels:  php-server, php-webserver
Event Loop
ReactPHP's core reactor event loop that libraries can use for evented I/O.
Stars: ✭ 945 (+3680%)
Mutual labels:  reactphp, event-loop
Child Process
Event-driven library for executing child processes with ReactPHP.
Stars: ✭ 225 (+800%)
Mutual labels:  reactphp
php-react-memcached
Asynchronous Memcached PHP Client for ReactPHP ecosystem
Stars: ✭ 27 (+8%)
Mutual labels:  reactphp
nodejs
Node.js in-process collectors for Instana
Stars: ✭ 66 (+164%)
Mutual labels:  event-loop
simple-event-loop
Fully-functional Event Loop in 100 Lines of Python
Stars: ✭ 52 (+108%)
Mutual labels:  event-loop
rawphp
A powerful, robust and API-first, PHP framework that helps people from different PHP backgrounds work on the same project seamlessly. You can write Laravel, CakePHP, Slim, Symphone and Procedural PHP code inside it and it all works perfectly. Its the PHP Framework for everyone.
Stars: ✭ 31 (+24%)
Mutual labels:  php-server
Hhvmcraft
📦 Minecraft Beta 1.7.3 Server implemented in PHP/HHVM, powered by ReactPHP.
Stars: ✭ 180 (+620%)
Mutual labels:  reactphp
reactphp-parallel
ReactPHP bindings around ext-parallel
Stars: ✭ 15 (-40%)
Mutual labels:  reactphp
nested scheduler
Shard for creating separate groups of fibers in a hierarchical way and to collect results and errors in a structured way.
Stars: ✭ 20 (-20%)
Mutual labels:  event-loop
http-middleware-psr15-adapter
A PSR-15 middleware adapter for react/http
Stars: ✭ 18 (-28%)
Mutual labels:  reactphp
all-about-node
All about Node.js
Stars: ✭ 16 (-36%)
Mutual labels:  event-loop
slim3-mvc
Slim 3 PHP micro framework MVC application boilerplate
Stars: ✭ 24 (-4%)
Mutual labels:  slimphp
pecan
ReactPHP Shell, based on the Symfony Console component.
Stars: ✭ 43 (+72%)
Mutual labels:  reactphp
Http Client
[Deprecated] Event-driven, streaming HTTP client for ReactPHP.
Stars: ✭ 228 (+812%)
Mutual labels:  reactphp
reactphp-child-process-promise
No description or website provided.
Stars: ✭ 12 (-52%)
Mutual labels:  reactphp
Php Console Spinner
Colorful highly configurable spinner for php cli applications (suitable for async apps)
Stars: ✭ 225 (+800%)
Mutual labels:  reactphp
sac
Sistema para gerenciamento da Semana Acadêmica de CC
Stars: ✭ 20 (-20%)
Mutual labels:  slimphp
Slim-Console
Slim Framework Console
Stars: ✭ 26 (+4%)
Mutual labels:  slimphp
slim-mobile-detect
Implements Mobile-Detect lib for Response's write on Slim Framework App
Stars: ✭ 18 (-28%)
Mutual labels:  slimphp

Latest Version Software License Build Status Total Downloads

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:

(new \ReactiveSlim\Server($slimInstance))
    ->run();

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-watch runs via local PHP installation (requires inotify-tools to be installed via package manager)
  • sh ./.tools/reactor run via local PHP installation and requires the reactor.config.json config
  • sh ./.tools/docker-watch run the app within a Docker container (requires inotify-tools to 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

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email :author_email instead of using the issue tracker.

Credits

This has been created to plug two great packages together:

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].