upscale / http-server-engine
Wiring of Zend Diactoros, FastRoute, and Aura.Di for RESTful API
Requires
- php: ~5.6 || ~7.0
- aura/di: ~3.1
- nikic/fast-route: ~1.0
- zendframework/zend-diactoros: ~1.3
Requires (Dev)
- phpunit/phpunit: ~5.4
README
HTTP Server Engine for RESTful API
This package wires up Zend Diactoros, FastRoute, and Aura.Di to power request parsing, routing, and dependency injection of a bare-bones RESTful API. Each library is the most lightweight/popular implementation in its class.
Usage
The intended use is RESTful web services based on the HTTP server skeleton. It defines the project structure, router configuration, and the entry point that bootstraps the engine.
Performance
Speed and minimalism are the objectives of the project. It comes with very little source code.
Total overheard of the engine is ~4 ms (0.004 sec) measured on a laptop. The estimates are based on execution of an empty handler dispatched among 100 declared routes.
License
Licensed under the Apache License, Version 2.0.