Symfony webservice template
This webservice can be copied with the Composer dependency manager.
-
Create project
composer create-project free2er/webservice my-service cd my-service
-
Copy the OAuth public key or create new one
cd keys openssl genrsa -out private.key 2048 openssl rsa -in private.key -pubout -out public.key
-
Check code style and tests
composer lint composer test
-
Done!
symfony serve curl localhost:8000 curl -H "Authorization: Bearer your.jwt.key" localhost:8000/api/v1/user
-
Install Docker and Docker Compose
-
Create project
git clone git@github.com:free2er/webservice.git my-service cd my-service
-
Copy the OAuth public key or create new one
cd keys openssl genrsa -out private.key 2048 openssl rsa -in private.key -pubout -out public.key
-
Check code style and tests
docker-compose run fpm composer lint docker-compose run fpm composer test
-
Done!
docker-compose up curl localhost:8000 curl -H "Authorization: Bearer your.jwt.key" localhost:8000/api/v1/user