I tend to define a Config record and pass it round the application where it is needed:
type alias Config =
{ mainApiRoot : String
, searchApiRoot : String
, otherApiRoot : String
, whateverParams : ...
}
For quick start during initial development, you can just hard code it:
config =
{ mainApiRoot = http://localhost:8000/api,
...
}
At least that way you have the config built into the application from scratch. As you evolve more towards production, pass in appropriate prod/test/dev versions as flags.