This is the solution for the Measurement Coding Challenge provided by Peter Thiel.
For installation follow these steps:
- Run
composer install
- Copy .env.example to .env
- Set
APP_URL=//{domain}
in .env - Set database config in .env (DB_CONNECTION, DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD)
- Add
L5_SWAGGER_CONST_HOST=//{domain}/api/v1
to .env - Run
php artisan l5-swagger:generate
- Run
php artisan migrate
- Run
php artisan optimize
For evaluation use:
- Swagger API at
//{domain}/api/documentation
- Postman Collection "Measurement Coding Challenge.postman_collection.json" attached
- Run Tests with
php artisan test
Looking forward to your feedback at [email protected]
- As required the endpoint
POST /sensors/{uuid}/measurements
is throttled to 1 request per minute. - Make sure folders have correct permissions (if possible use
chmod -R 777 ./
)