Create a basic HTTP server that returns the current date and time. Implement this server using multiple web frameworks, add tests, and containerize the application using Docker and Docker Compose.
Requirements:
1. Server Functionality:
[x] Endpoint:GET /datetime
[x] Response: Current date and time
2. Implementations:
[x] Implement the server using:
[x] a. Standard library (net/http)
[x] b. Gin
3. Testing:
[x] Use Go's testing package and an HTTP testing library (e.g., httptest)
4. Docker:
[x] Create a Dockerfile for each framework implementation
[x] Ensure each Docker image is optimized for size (Multistage builds)
5. Docker Compose:
[x] Create a docker-compose.yml file that runs all framework versions
[x] Configure each service to run on a different port
6. Documentation:
[x] Provide a README with setup and running instructions
7. Makefile driven:
[x] You should use make and a Makefile to drive the steps of:
[x] Building the binaries
[x] Formatting
[x] Linting
[x] Building the images
[x] Launching the containers
Optional Enhancements:
[x] Implement graceful shutdown for each server
Acceptance Criteria:
[x] All implementations pass the same test suite
[x] Docker images build and run successfully
[x] Docker Compose file correctly orchestrates all services
[x] README provides clear instructions for running and testing the project
Create a basic HTTP server that returns the current date and time. Implement this server using multiple web frameworks, add tests, and containerize the application using Docker and Docker Compose.
Requirements:
1. Server Functionality:
[x] Endpoint:
GET /datetime
[x] Response: Current date and time
2. Implementations:
net/http
)3. Testing:
httptest
)4. Docker:
5. Docker Compose:
docker-compose.yml
file that runs all framework versions6. Documentation:
7. Makefile driven:
make
and a Makefile to drive the steps of:Optional Enhancements:
Acceptance Criteria: