Ktor 3.2.0 will add support for automatically deserializing configuration files into data classes.
Let's define a simple application.yaml
that defines some database configuration.
database:
driverClassName: "$DB_DRIVER_CLASS_NAME:org.postgresql.Driver"
host: "$DB_HOST:localhost"
port: "$DATABASE_PORT:5432"