https://github.com/zolex/reactphp-bundle
ReactPHP Symfony Bundle
https://github.com/zolex/reactphp-bundle
Last synced: 7 months ago
JSON representation
ReactPHP Symfony Bundle
- Host: GitHub
- URL: https://github.com/zolex/reactphp-bundle
- Owner: zolex
- License: mit
- Created: 2025-06-21T21:36:51.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-04T12:57:44.000Z (about 1 year ago)
- Last Synced: 2025-10-04T23:52:45.257Z (9 months ago)
- Language: PHP
- Size: 73.2 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ReactPHP Symfony Bundle
[](https://github.com/zolex/ReactPhpBundle/actions)

[](https://github.com/zolex/reactphp-bundle/actions)
[](https://codecov.io/gh/zolex/reactphp-bundle)





A Symfony Bundle providing a Runtime for [ReactPHP](https://github.com/reactphp/reactphp), a PSR-17 Kernel and a Router to serve assets.
Turn any Symfony project into a "self-serving" application, no traditional webserver required.
### Installation
```bash
composer require zolex/reactphp-bundle
```
### Start the server
```bash
APP_RUNTIME="Zolex\\ReactPhpBundle\\Runtime\\ReactPhpRuntime" php public/index.php
```
For a very basic docker example, check the [Dockerfile](./docs/Dockerfile) in the docs folder.
### Assets
To allow serving assets from the public directory through ReactPHP, add this file to your project `config/routes/react_bundle.yaml`
```yaml
reactphp_bundle:
type: reactphp_bundle
resource: .
```
By default, only files in the `public/bundles` directory are served (like Swagger-UI in API-Platform).
Additional directories and files can be registered in the bundle config at `config/bundles/zolex_react_php.yaml`:
```yaml
zolex_react_php:
asset_paths:
- /bundles/
- /custom-dir/
- /single-file.js
- /another/single/file.css
```