- Implement pkg/config package with Viper integration - Support environment variables with DLC_ prefix - Add configurable server host, port, and shutdown timeout - Update server to use configuration values - Add config.example.yaml template file - Update AGENTS.md with configuration documentation - Maintain backward compatibility with default values Configuration options: - DLC_SERVER_HOST (default: 0.0.0.0) - DLC_SERVER_PORT (default: 8080) - DLC_SHUTDOWN_TIMEOUT (default: 30s)
23 lines
623 B
YAML
23 lines
623 B
YAML
# DanceLessonsCoach Configuration Example
|
|
# This file shows the available configuration options
|
|
# You can use this as a template for your own configuration
|
|
|
|
# Server configuration
|
|
server:
|
|
# Host address to bind to (default: "0.0.0.0")
|
|
host: "0.0.0.0"
|
|
|
|
# Port to listen on (default: 8080)
|
|
port: 8080
|
|
|
|
# Shutdown configuration
|
|
shutdown:
|
|
# Timeout duration for graceful shutdown (default: 30s)
|
|
# Format: number + unit (s, m, h)
|
|
timeout: 30s
|
|
|
|
# Environment Variables
|
|
# You can also configure via environment variables with DLC_ prefix:
|
|
# DLC_SERVER_HOST=0.0.0.0
|
|
# DLC_SERVER_PORT=8080
|
|
# DLC_SHUTDOWN_TIMEOUT=30s |