timostamm / microserver
v2.0.2
2018-07-19 15:32 UTC
Requires
- php: ^7.1.3
- doctrine/annotations: ^1.6
- doctrine/cache: ^1.7
- symfony/http-foundation: ^4.0
- symfony/routing: ^4.0
README
Minimal web server based on Symfony components.
It is very simple to use:
$server = new Server(); $server->addController(SimpleController::class); $server->serve()->send();
For an example how to use composer autoloading, see htdocs/index.php
Features:
- Support for symfony
@Route
annotations - Support for route parameters as controller arguments (scalar types)
- Robust exception handling
- JSON exception formatting (by using JsonServer)
- Controller constructor arguments can be provided by calling addController() with a factory function as second argument
- Nothing else