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