Initial commit: there's still tons of base Phoenix boilerplate to remove, but the...
[tech-radar-editor.git] / lib / tech_radar_editor.ex
1 defmodule TechRadarEditor do
2 use Application
3
4 # See http://elixir-lang.org/docs/stable/elixir/Application.html
5 # for more information on OTP Applications
6 def start(_type, _args) do
7 import Supervisor.Spec
8
9 # Define workers and child supervisors to be supervised
10 children = [
11 # Start the Ecto repository
12 supervisor(TechRadarEditor.Repo, []),
13 # Start the endpoint when the application starts
14 supervisor(TechRadarEditor.Endpoint, []),
15 # Start your own worker by calling: TechRadarEditor.Worker.start_link(arg1, arg2, arg3)
16 # worker(TechRadarEditor.Worker, [arg1, arg2, arg3]),
17 ]
18
19 # See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
20 # for other strategies and supported options
21 opts = [strategy: :one_for_one, name: TechRadarEditor.Supervisor]
22 Supervisor.start_link(children, opts)
23 end
24
25 # Tell Phoenix to update the endpoint configuration
26 # whenever the application is updated.
27 def config_change(changed, _new, removed) do
28 TechRadarEditor.Endpoint.config_change(changed, removed)
29 :ok
30 end
31 end