Spark is a PSR-7 compliant Action-Domain-Responder (ADR) system. While it may look like a micro-framework (and it is), it is more like a wrapper around the real logic of your application domain. It's also PSR-1, PSR-2, and PSR-4 compliant.
You will need Composer to install Spark.
Pick a project name, and use Composer to create it with Spark. Let's create
one called spark-project
:
composer create-project -s dev sparkphp/project spark-project
Confirm the installation by changing into the project directory and starting the built-in PHP web server:
cd spark-project
php -S localhost:8000 -t web/
You can then browse to http://localhost:8000/shifts and see JSON output:
{"shifts": []}
You can also browse to http://localhost:8000/shifts?user_id=1 and see modified JSON output:
{"meta": {}, "shifts": []}
Not much to read yet. Check out the source project here.