Hello again. I have the following bit of code which loads in configuration from the environment.
{-
Ideally this would be automatically generated from a dhall file from within
`og-config`
-}
let Lib = ../../og-config/lib.dhall
let config = \(app : Lib.App.Config) ->
(Lib.App.Builder.make app)::
{ MONGO =
{ host = env:APP1__MONGO__host as Text ? app.MONGO.host
, port = env:APP1__MONGO__port as Text ? app.MONGO.port
, username = env:APP1__MONGO__username as Text ? app.MONGO.username
, password = env:APP1_MONGO__password as Text ? app.MONGO.password
, database = env:APP1__MONGO__database as Text ? app.MONGO.database
, poolSize = env:APP1__MONGO__poolSize as Text ? app.MONGO.poolSize
, authenticationDatabase =
env:APP1__MONGO__authenticationDatabase as Text
? app.MONGO.authenticationDatabase
}
}
in { config = config }
Is there a way which I could parameterize the env:
call so that APP1
can be dynamically provided?