Changeset View
Changeset View
Standalone View
Standalone View
lib/kolab_chat.ex
defmodule KolabChat do | defmodule KolabChat do | ||||
use Application | use Application | ||||
# See http://elixir-lang.org/docs/stable/elixir/Application.html | # See http://elixir-lang.org/docs/stable/elixir/Application.html | ||||
# for more information on OTP Applications | # for more information on OTP Applications | ||||
def start(_type, _args) do | def start(_type, _args) do | ||||
import Supervisor.Spec | import Supervisor.Spec | ||||
# Define workers and child supervisors to be supervised | # Define workers and child supervisors to be supervised | ||||
children = [ | children = [ | ||||
# Start the Ecto repository | # Start the Ecto repository | ||||
supervisor(KolabChat.Repo, []), | supervisor(KolabChat.Repo, []), | ||||
# Start the endpoint when the application starts | # Start the endpoint when the application starts | ||||
supervisor(KolabChat.Endpoint, []), | supervisor(KolabChat.Endpoint, []), | ||||
# Start phoenix presence module | |||||
supervisor(KolabChat.Presence, []), | |||||
# Start your own worker by calling: KolabChat.Worker.start_link(arg1, arg2, arg3) | # Start your own worker by calling: KolabChat.Worker.start_link(arg1, arg2, arg3) | ||||
# worker(KolabChat.Worker, [arg1, arg2, arg3]), | # worker(KolabChat.Worker, [arg1, arg2, arg3]), | ||||
] | ] | ||||
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html | # See http://elixir-lang.org/docs/stable/elixir/Supervisor.html | ||||
# for other strategies and supported options | # for other strategies and supported options | ||||
opts = [strategy: :one_for_one, name: KolabChat.Supervisor] | opts = [strategy: :one_for_one, name: KolabChat.Supervisor] | ||||
Supervisor.start_link(children, opts) | Supervisor.start_link(children, opts) | ||||
Show All 9 Lines |