Skip to content

Update Service Port Configuration to Use Environment Variable

Description

Modify the microservice to use an environment variable for port configuration instead of the hardcoded 8080 port. This change will make the service more configurable across different environments.

Technical Requirements

  • Add PORT environment variable support
  • Implement fallback to default port (8080) if not set
  • Add port validation (valid range: 1024-65535)
  • Update configuration handling in main.go