Swift Configuration has been introduced
source: forums.swift.org ↗Configuration management has long been a challenge across different sources and environments. Previously, configuration in Swift had to be manually stitched together from environment variables, command-line arguments, JSON files, and external systems. Swift Configuration creates a common interface for configuration, enabling you to:
Read configuration the same way across your codebase using a single configuration reader API that’s usable from both applications and libraries.
Quickly get started with a few lines of code using built-in providers for environment variables, command-line arguments, JSON and YAML files, and in-memory values.
Build and share custom configuration providers using a public
ConfigProvider
protocol that anyone can implement and share.
This is a fantastic addition, and especially for Swift on Server.