Effect CommunityEC
Effect Community2y ago
3 replies
attila

Approaching File Path Construction and JSON Config Loading with Environment Variables Using Effec...

I see that No Access has been deprecated, so I'll ask it here. How would you approach the situation when you have 2 environment variables required to construct a file path, which you'd then check if the file exists and load a json config from that file? How would you express this using Effect's config? I was looking for a Config.flatMap function that let's you alter the shape of the config (unlike Config.map). It's also fine if this is not (yet?) possible, I could probably construct a ConfigError myself and return it from within Layer.effect.
Was this page helpful?