This project contains a golang HTTP Server for a FizzBuzz API.
See requirements for a detailed specification of the API.
The project contains:
- the binary cmd/main.go
- the fizzbuzz service pkg/service/fizzbuzz with tests
- some middlewares /pkg/middlewares
- the API /pkg/api/api.go
curl --request GET \
--url 'http://localhost:8080/fizzbuzz?string1=fizz&string2=buzz&int1=3&int2=5&limit=100' \
--header 'Authorization: testkey'
The server reads a tiny configuration from environment variables:
- SERVER_HOST
- SERVER_PORT
- ADMIN_PORT
and some optional ones:
- READ_TIMEOUT
- READ_HEADER_TIMEOUT
- WRITE_TIMEOUT
- IDLE_TIMEOUT
- MAX_HEADER_BYTES
- API_KEY
make gorun
make ci