Current section

Files

Jump to
shopifex lib shopifex application.ex
Raw

lib/shopifex/application.ex

defmodule Shopifex.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
children =
if Application.get_env(:shopifex, :env) == :test do
[
ShopifexDummy.Repo,
{Phoenix.PubSub, name: ShopifexDummy.PubSub},
ShopifexDummyWeb.Endpoint
]
else
[]
end
|> Kernel.++([
Shopifex.RedirectAfterAgent
])
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: Shopifex.Supervisor]
Supervisor.start_link(children, opts)
end
end