Understanding Fallbacks in Config

Struggling on understanding
Config
fallbacks.

I want to have
Config
read
env
values, and if that value does not exist, I want a fallback for some values.

I have something like this

Effect.gen(function* () {
  const my_route = yield* Config.string('MY_ROUTE').pipe(ConfigProvider.fromMap(() => new Map([['MY_ROUTE', '/my_route']])),
ConfigProvider.orElse
)
})

This is not working (obviously), I just don't fully grasp how effect wants fallbacks written.

if Config.string returns a falsey string, is that going to trigger an orElse clause?

Do i need to provide a map?

sorry i know this codes not correct
Was this page helpful?