antidot-fw / antidot-react-http
This package is abandoned and no longer maintained.
No replacement package was suggested.
Anti.Framework on top of react http server
dev-main
2021-01-30 12:27 UTC
Requires
- php: ^7.4.3
- antidot-fw/fast-router-adapter: ^0.1.0
- antidot-fw/framework: ^0.1.1
- react/event-loop: ^1.1
- react/http: ^0.8.5
- react/socket: ^1.3
- recoil/react: ^1.0
- recoil/recoil: ^1.0
Requires (Dev)
- phpro/grumphp: 0.16.2
- phpstan/phpstan: ^0.11.5
- phpunit/phpunit: ^8.0
- squizlabs/php_codesniffer: ^3.4
- symfony/var-dumper: ^4.2
This package is auto-updated.
Last update: 2021-03-01 00:33:10 UTC
README
[DEPRECATED] This package will not be mantained any more. if you want to go react with Antidot framework, take a look at Reactive Starter package
Adapter that allows running Antidot Framework Applications on a React PHP server
Installation:
Using composer package manager
composer require antidot-fw/antidot-react-http:dev-master
We have to add the config provider to the framework configuration to load the necessary dependencies, we make sure to load it after the provider of the framework itself.
<?php // config/config.php declare(strict_types=1); $aggregator = new ConfigAggregator([ // ... other config providers \Antidot\Container\Config\ConfigProvider::class, // Framework default config provider \Antidot\React\Container\Config\ConfigProvider::class, // React Application config provider new PhpFileProvider(realpath(__DIR__).'/services/{{,*.}prod,{,*.}local,{,*.}dev}.php'), new YamlConfigProvider(realpath(__DIR__).'/services/{{,*.}prod,{,*.}local,{,*.}dev}.yaml'), new ArrayProvider($cacheConfig), ], $cacheConfig['config_cache_path']); return $aggregator->getMergedConfig();
Running server:
We just need to run a console command and we'll have the server up and running on port 8080
.
bin/console react-server:http
Server config:
parameters: react_http_server: uri: "localhost:8080"