FizzBuzz is a small project that exposes the fizzbuzz endpoint /: min /: max.
:Min and:max are integers.
The endpoint must print all integers between these 2, but with the following conditions:
- If the number is multiples of 3 -> print "Fizz"
- If the number is multiples of 5 -> print "Buzz"
- If multiple of both -> print "FizzBuzz"
Request Example: GET / fizzbuzz / 1/5 1 2 Fizz 4 Buzz
The API returns a JSON.
PHP >= 5.5.9
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
-
Composer must be installed first
-
Then move to the root of the project and execute:
composer install
- and finally
php -S localhost:8080 -t public/
The application runs at http://localhost:8080/fizzbuzz/1/5
At the root of the project run:
vendor/bin/phpunit
The FizzBuzz API is open-sourced software licensed under the MIT license