When scaffolding an Umbrella app with Mix, the following swoosh
configuration can be found in the global prod
config file:
config :swoosh, :api_client, MyApp.Finch
However I have multiple apps, and don’t really understand why this is then global, and which Finch
instance should be specified.
When I scaffold the different Umbrella apps, I’ll typically have multiple Finch clients started by default:
defmodule FooApp.Application do
use Application
def start(_type, _args) do
children = [
# ...
{Finch, name: FooApp.Finch}
]
Supervisor.start_link(children, strategy: :one_for_one, name: FooApp.Supervisor)
end
end
defmodule BarApp.Application do
use Application
def start(_type, _args) do
children = [
# ...
{Finch, name: BarApp.Finch}
]
Supervisor.start_link(children, strategy: :one_for_one, name: BarApp.Supervisor)
end
end
etcetera
Thank you for any help!