This is a small http server framework built on top of react http. It allows to quickly build simple applications

Installs: 39

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 0

Forks: 1

Open Issues: 0


0.4.3 2019-12-13 22:02 UTC

This package is auto-updated.

Last update: 2020-09-13 23:44:47 UTC


This is a small http server framework built on top of React HTTP.

This framework is designed to build quick proofs of concepts.

It is not mature enough to run in production environments, because:

  • it still contains synchronous blocking code
  • react http itself is not stable




Most of features are directly inherited from PHP React HTTP

  • Middleware based
  • Highly customizable
  • PSR-7 messages
  • Basic routing
  • Basic PSR-3 logging
  • Static files serving
  • Let you focus on your service logic, not building a HTTP response (boooring)
    • Just return arrays or objects in your route handlers, that's it:
    function (ServerRequestInterface $request) {
        return ['hello' => 'world'];


Install with composer:

composer require phpbg/mini-httpd


See example folder

  • bare-minimal-json-server.php shows the very minimal setup for json rendering
  • full-featured-server.php shows a full setup with:
    • Static files serving
    • Route redirection examples
    • Automatic PHTML renderer features and suggested layout
    • Accessing request params with proper validation / filtering

There is also a complete example that integrates with ratchet Websockets here:


  • writing tests