Closed domdorn closed 4 months ago
nevermind.. got it working.. key was using the Nested
class, like this:
userAgent <- ZLayer.fromZIO(ZIO.config(Config.Nested("akka", Config.Nested("http", Config.Nested("client", Config.string("user-agent-header"))))))
later I figured out, I can use it like this as well:
userAgent <- ZIO.config(Config.string("user-agent-header").nested("akka", "http", "client"))
I'm having a hard time getting zio-config to run in my application... all the examples focus around mapping to custom data types, while I just want to use the
ZIO.config(...)
way to access a registered config..Please see this simplified test to see what I want to achieve as a minimum.
Thanks, Dominik