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://swagger.io/docs/specification/about/
- https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md
with ❤️ for you