Created
September 20, 2016 20:10
-
-
Save brucepom/cf51de7fedf65e0fa41c02bb7b332639 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /apps/cdt_dashboard/lib/cdt_dashboard.ex | |
defmodule CdtDashboard do | |
@moduledoc """ | |
Entry point for application | |
""" | |
use Application | |
# See http://elixir-lang.org/docs/stable/elixir/Application.html | |
# for more information on OTP Applications | |
@lint false | |
def start(_type, _args) do | |
import Supervisor.Spec | |
# Define workers and child supervisors to be supervised | |
children = [ | |
# Start the Ecto repository | |
supervisor(CdtDashboard.Repo, []), | |
# Start the endpoint when the application starts | |
supervisor(CdtDashboard.Endpoint, []), | |
# Start your own worker by calling: CdtDashboard.Worker.start_link(arg1, arg2, arg3) | |
# worker(CdtDashboard.Worker, [arg1, arg2, arg3]), | |
] | |
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html | |
# for other strategies and supported options | |
opts = [strategy: :one_for_one, name: CdtDashboard.Supervisor] | |
Supervisor.start_link(children, opts) | |
end | |
# Tell Phoenix to update the endpoint configuration | |
# whenever the application is updated. | |
@lint false | |
def config_change(changed, _new, removed) do | |
CdtDashboard.Endpoint.config_change(changed, removed) | |
:ok | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment