PHPackages                             mvc4us/react-static - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. mvc4us/react-static

ActiveLibrary[HTTP &amp; Networking](/categories/http)

mvc4us/react-static
===================

A simple middleware for serving static files with ReactPHP

v0.2.0(3y ago)098MITPHPPHP &gt;=8.1

Since Feb 17Pushed 3y agoCompare

[ Source](https://github.com/mvc4us/reactphp-static)[ Packagist](https://packagist.org/packages/mvc4us/react-static)[ RSS](/packages/mvc4us-react-static/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

reactphp-static
===============

[](#reactphp-static)

A simple middleware for serving static files with ReactPHP

Installation
------------

[](#installation)

```
composer require mvc4us/react-static
```

Usage
-----

[](#usage)

Use it in your ReactPHP like a normal middleware, passing in an array of base url(s) pointing to associated webroot(s). All the files under any webroot (including subdirectories) will be served.

```
new Mvc4us\ReactStatic\StaticServer([
    "/" => "/wwwroot/domain/public",
    "/docs" => "/documents/from/other/directory"
]);
```

Optionally to exclude some files you can define an array of shell patterns as a second parameter:

```
new Mvc4us\ReactStatic\StaticServer(
    ["/" => "/webroot"],
    ["*.php", ".htaccess", "*private*"]
);
```

The middleware will serve any static files if they exist or return 404 response if it is excluded. If a file does not exist for the requested path, it continues processing next middleware, letting you run the rest of your application.

Enjoy!

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~240 days

Total

2

Last Release

1358d ago

PHP version history (2 changes)v0.1.0PHP &gt;=8.0

v0.2.0PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4586452?v=4)[Erdem UNCUOĞLU](/maintainers/erdemuncuoglu)[@erdemuncuoglu](https://github.com/erdemuncuoglu)

---

Top Contributors

[![erdemuncuoglu](https://avatars.githubusercontent.com/u/4586452?v=4)](https://github.com/erdemuncuoglu "erdemuncuoglu (2 commits)")[![OrdinaryJellyfish](https://avatars.githubusercontent.com/u/33029517?v=4)](https://github.com/OrdinaryJellyfish "OrdinaryJellyfish (1 commits)")

### Embed Badge

![Health badge](/badges/mvc4us-react-static/health.svg)

```
[![Health](https://phpackages.com/badges/mvc4us-react-static/health.svg)](https://phpackages.com/packages/mvc4us-react-static)
```

###  Alternatives

[ccxt/ccxt

A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go

43.2k341.0k1](/packages/ccxt-ccxt)[discord-php/http

Handles HTTP requests to Discord servers

24360.3k12](/packages/discord-php-http)[clue/soap-react

Simple, async SOAP webservice client library, built on top of ReactPHP

64123.7k2](/packages/clue-soap-react)[rx/websocket

Websockets for PHP using Rx

35182.6k2](/packages/rx-websocket)[php-http/react-adapter

React HTTP Adapter

19267.7k4](/packages/php-http-react-adapter)[voryx/websocketmiddleware

WebSocket Middleware for React

2669.4k3](/packages/voryx-websocketmiddleware)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
