Current section
Files
Jump to
Current section
Files
lib/tehama_client/application.ex
defmodule TehamaClient.Application do
@moduledoc false
def start(_type, args) do
children =
case args do
[env: :prod] ->
[]
[env: :test] ->
[{Plug.Cowboy, scheme: :http, plug: TehamaClient.MockServer, options: [port: 8081]}]
[env: :dev] ->
[]
[_] ->
[]
end
opts = [strategy: :one_for_one, name: TehamaClient.Supervisor]
Supervisor.start_link(children, opts)
end
end