This directory contains examples demonstrating various Swift Configuration features and patterns.
The examples are organized by complexity and use case, starting with basic concepts and progressing to more advanced scenarios. Each example includes step-by-step instructions, expected output, and explanations of the Swift Configuration concepts being demonstrated.
Each example is a self-contained Swift package. Navigate to the specific example directory and use standard Swift Package Manager commands:
cd Examples/{example-name}
swift build
swift run {target-name}| Example | Description | Key Concepts |
|---|---|---|
hello-world-cli-example |
Simple CLI demonstrating provider hierarchy and basic configuration reading | Provider priority, environment variables, command-line arguments, type-safe reading |
reloading-example |
Simple web server demonstrating live reloading from a Kubernetes configMap | Live-reloading, file providers, multi-phase initialization |