Contains quality tested packages, thoughtful structure and everything you need to develop microservices.
composer create-project 'sunrise/awesome-skeleton:^3.0' app
Set up your database connection:
cp .env.example .env && nano .env
Execute a migration:
php bin/app migrations:migrate --service 'master' --no-interaction
incl.: Doctrine DBAL, Doctrine ORM, Doctrine Migrations.
php bin/app
listen 0.0.0.0:3000
composer serve
listen 0.0.0.0:3000
Set up your server:
cp .rr.yml.example .rr.yml && nano .rr.yml
Run the server:
rr -dv serve
Coming soon...
composer test
composer bench
you may need to change the server address...
curl -X 'GET' 'http://127.0.0.1:3000/'
curl -X 'GET' 'http://127.0.0.1:3000/openapi'
curl -X 'POST' -H 'Content-Type: application/json' -d '{"name": "foo", "slug": "foo"}' 'http://127.0.0.1:3000/api/v1/entry'
you need to set an existing ID.
curl -X 'PATCH' -H 'Content-Type: application/json' -d '{"name": "foo", "slug": "foo"}' 'http://127.0.0.1:3000/api/v1/entry/b06fd41d-d131-4bb9-a472-eb583369437c'
you need to set an existing ID.
curl -X 'DELETE' 'http://127.0.0.1:3000/api/v1/entry/b06fd41d-d131-4bb9-a472-eb583369437c'
you need to set an existing ID.
curl -X 'GET' 'http://127.0.0.1:3000/api/v1/entry/b06fd41d-d131-4bb9-a472-eb583369437c'
curl -X 'GET' 'http://127.0.0.1:3000/api/v1/entry'
bash bin/deploy
bash bin/down 'Reason...'
bash bin/up
php bin/app app:roadrunner:generate-systemd-unit > app.service
php bin/app app:openapi:generate-document > openapi.json
see composer.json
- https://github.com/PHP-DI/PHP-DI
- https://github.com/Seldaek/monolog
- https://github.com/sunrise-php/http-router
- https://github.com/doctrine/orm
- https://github.com/doctrine/migrations
- https://github.com/symfony/console
- https://github.com/symfony/validator
- https://github.com/justinrainbow/json-schema
- https://roadrunner.dev/
- https://github.com/spiral/roadrunner
- https://swagger.io/docs/specification/about/
- https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md
with β€οΈ for you