Skip to content

A simple middleware for serving static files with ReactPHP

License

Notifications You must be signed in to change notification settings

OrdinaryJellyfish/reactphp-static

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reactphp-static

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!

Buy me a coffee <3

About

A simple middleware for serving static files with ReactPHP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages