Skip to content

lahssenk/fizzbuzz-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

INTRO

This project contains a golang HTTP Server for a FizzBuzz API.

See requirements for a detailed specification of the API.

CODE

The project contains:

TRY WITH CURL

curl --request GET \
  --url 'http://localhost:8080/fizzbuzz?string1=fizz&string2=buzz&int1=3&int2=5&limit=100' \
  --header 'Authorization: testkey'

RUN

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

Go

make gorun

Docker

make ci