2017 © Pedro Peláez
 

library react-bundle

ReactPHP Bundle for Symfony2

image

itscaro/react-bundle

ReactPHP Bundle for Symfony2

  • Friday, October 2, 2015
  • by itscaro
  • Repository
  • 1 Watchers
  • 1 Stars
  • 238 Installations
  • CSS
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Introduction

Run Symfony apps under React-PHP., (*1)

This module adds enable the usage of ReactPHP server for Symfony., (*2)

No configuration is needed. Follow the Installation instructions and read Usage section to know how to start using ReactPHP with your Symfony APP., (*3)

Installation

Composer

To install the bundle through Composer, run the following command in console at your project base path:, (*4)

php composer.phar require itscaro/react-bundle

Register bundle

Then register the new bundle in your AppKernel., (*5)

<?php

    // #app/AppKernel.php
    $bundles = array(
        ...
        new Itscaro\ReactBundle\JogaramReactBundle(),
        ...
    );

Usage

To start using ReactPHP with Symfony, open console, go to your project root path and execute the following command:, (*6)

php app/console react:server:run --standalone

Available options

--host=127.0.0.1 Selects IP to run server at. Defaults to 127.0.0.1. --port=1337 Selects port to run server at, use comma to separate ports. Defaults to 1337. --standalone If passed, React server will serve static files directly. (Use this if you don`t have Apache or Nginx running in you local machine. Static file serving is not designed for production environments) --cache If passed, class loader will be enabled. --apc If passed, APC class loader will be enabled. This option requires --cache option. --sessionleader Available for background server, promote the forked process to be session leader, (*7)

Background server

  • To start the server execute the following:
php app/console react:server:start
  • To stop the server, run:
php app/console react:server:stop

Note: If host and port are specified when starting the server, they must be specified for the stop command., (*8)

  • To restart the server:
php app/console react:server:restart

Using with web server as load balancer

Apache

<Proxy balancer://mycluster>
BalancerMember http://<ip:port of ReactPHP server>
BalancerMember http://<ip:port of ReactPHP server>
</Proxy>
ProxyPass / balancer://mycluster

Apache Document, (*9)

Nginx

http {
    upstream mycluster {
        server <ip:port of ReactPHP server>;
        server <ip:port of ReactPHP server>;
    }

    server {
        listen 80;

        location / {
            proxy_pass http://mycluster;
        }
    }
}

Nginx Document, (*10)

Credits

Blackshawk, (*11)

The Versions

02/10 2015

dev-master

9999999-dev

ReactPHP Bundle for Symfony2

  Sources   Download

proprietary

The Requires

 

01/10 2015

1.1.0

1.1.0.0

ReactPHP Bundle for Symfony2

  Sources   Download

proprietary

The Requires

 

01/10 2015

1.0.0

1.0.0.0

ReactPHP Bundle for Symfony2

  Sources   Download

proprietary

The Requires