ordinaryjellyfish / react-static
A simple middleware for serving static files with ReactPHP
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/ordinaryjellyfish/react-static
Requires
- react/http: ^0.8.5
This package is auto-updated.
Last update: 2025-02-22 02:47:11 UTC
README
A simple middleware for serving static files with ReactPHP
Installation
composer require ordinaryjellyfish/react-static
Usage
Use it in your ReactPHP like a normal middleware, passing in your webroot:
new OrdinaryJellyfish\ReactStatic\StaticServer(__DIR__);
The middleware will serve any static files if they exist. If a file does not exist for the requested path, the middleware will exit, letting you run the rest of your application.
Enjoy!