Skip to content

Commit d42e626

Browse files
committed
initial release
0 parents  commit d42e626

33 files changed

+23917
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.idea/
2+
/vendor

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Samuel CHEMLA
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# PhpBg\MiniHttpd
2+
This is a small http server framework built on top of [React HTTP](https://github.com/reactphp/http).
3+
4+
This framework is designed to build quick proofs of concepts.
5+
6+
It is **not** mature enough to run in production environments, because:
7+
* it still contains synchronous blocking code
8+
* react http itself is not stable
9+
10+
## License
11+
MIT
12+
13+
## Features
14+
Most of features are directly inherited from [PHP React HTTP](https://github.com/reactphp/http)
15+
* [Middleware](https://github.com/reactphp/http#middleware) based
16+
* see https://github.com/reactphp/http/wiki/Middleware for interesting middlewares you can add to this library
17+
* Highly customizable
18+
* [PSR-7 messages](https://www.php-fig.org/psr/psr-7/)
19+
* Basic routing
20+
* Basic [PSR-3 logging](https://www.php-fig.org/psr/psr-3/)
21+
* Static files serving
22+
* Focus on **returning** data, not **building response to render** data
23+
* Route handlers can return simple array or objects
24+
25+
## Install
26+
Install with [composer](https://getcomposer.org/):
27+
```
28+
composer require phpbg/mini-httpd
29+
```
30+
31+
## Examples
32+
See `example` folder for a complete demo.

composer.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "phpbg/mini-httpd",
3+
"description": "This is a small http server framework built on top of react http. It allows to quickly build simple applications",
4+
"type": "library",
5+
"license": "MIT",
6+
"keywords": [
7+
"http",
8+
"httpd",
9+
"react",
10+
"server",
11+
"psr/http-message"
12+
],
13+
"authors": [
14+
{
15+
"name": "Samuel CHEMLA",
16+
"email": "[email protected]",
17+
"role": "Developer"
18+
}
19+
],
20+
"require": {
21+
"php": ">=7.0",
22+
"react/http": "^0.8.3",
23+
"zendframework/zend-validator": "^2.10",
24+
"zendframework/zend-filter": "^2.8",
25+
"psr/log": "^1.0",
26+
"psr/http-message": "^1.0",
27+
"react/promise": "^2.7"
28+
},
29+
"suggest": {
30+
"wyrihaximus/react-http-middleware-session": "session handling"
31+
},
32+
"autoload": {
33+
"psr-4": {
34+
"PhpBg\\MiniHttpd\\": "src"
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)