PHPackages                             jalle19/react-http-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jalle19/react-http-static

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jalle19/react-http-static
=========================

A helper around react/http for creating static web servers

0.1.4(9y ago)2198MITPHPPHP &gt;=5.6

Since May 31Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Jalle19/react-http-static)[ Packagist](https://packagist.org/packages/jalle19/react-http-static)[ RSS](/packages/jalle19-react-http-static/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

react-http-static
=================

[](#react-http-static)

[![Build Status](https://camo.githubusercontent.com/a5f5743e4877166ecc38784a98f35de0db9db96fcb0db6178be7c5fd3724860f/68747470733a2f2f7472617669732d63692e6f72672f4a616c6c6531392f72656163742d687474702d7374617469632e7376673f6272616e63683d747261766973)](https://travis-ci.org/Jalle19/react-http-static)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/2d1e19b1ed82878a0c5f0994ac3aff3dea65bd02314621f6d295531a07e30f03/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4a616c6c6531392f72656163742d687474702d7374617469632f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Jalle19/react-http-static/?branch=master)[![Coverage Status](https://camo.githubusercontent.com/0aa0718530985174844772b108c548509dc3405df8eb98e48c8bfd69c378d9f3/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4a616c6c6531392f72656163742d687474702d7374617469632f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Jalle19/react-http-static?branch=master)

This is a very basic helper for creating static web servers using `react/http`. It serves files from a specified directory and can optionally be configured to require authentication.

Requirements
------------

[](#requirements)

- PHP &gt;= 5.6

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

[](#installation)

```
composer require jalle19/react-http-static

```

Usage
-----

[](#usage)

This example will serve the directory `/var/www` on port 8080. Additionally it will require clients to authenticate using the username `admin` and the password `admin`.

```
