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:
[x] 1. Server Functionality:
Endpoint: GET /datetime
Response: Current date and time
[x] 2. Implementations:
Implement the server using:
a. Standard library (net/http)
b. Gin
[x] 3. Testing:
Use Go's testing package and a HTTP testing library (e.g., httptest)
[x] 4. Docker:
Create a Dockerfile for each framework implementation
Ensure each Docker image is optimized for size (Multistage builds)
[x] 5. Docker Compose:
Create a docker-compose.yml file that runs all framework versions
Configure each service to run on a different port
[x] 6. Documentation:
Provide a README with setup and running instructions
[x] 7. Makefile driven: You should use make and a Makefile to drive the steps of
Building the binaries
Formatting
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
Date Time Server
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:
[x] 1. Server Functionality:
[x] 2. Implementations:
b. Gin
[x] 3. Testing:
[x] 4. Docker:
[x] 5. Docker Compose:
[x] 6. Documentation:
[x] 7. Makefile driven: You should use make and a Makefile to drive the steps of
Optional Enhancements:
Acceptance Criteria: