From 10275f7bbf7c79214a52e837294a8c16fdfaa549 Mon Sep 17 00:00:00 2001 From: kballou Date: Sun, 30 Oct 2016 22:25:56 -0600 Subject: Add OTP app and sup modules --- lib/octochat/application.ex | 12 ++++++++++++ lib/octochat/supervisor.ex | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 lib/octochat/application.ex create mode 100644 lib/octochat/supervisor.ex (limited to 'lib') diff --git a/lib/octochat/application.ex b/lib/octochat/application.ex new file mode 100644 index 0000000..a820dcc --- /dev/null +++ b/lib/octochat/application.ex @@ -0,0 +1,12 @@ +defmodule Octochat.Application do + @moduledoc """ + Octochat OTP application/entry point + """ + + use Application + + def start(_, _) do + Octochat.Supervisor.start_link() + end + +end diff --git a/lib/octochat/supervisor.ex b/lib/octochat/supervisor.ex new file mode 100644 index 0000000..b26f4de --- /dev/null +++ b/lib/octochat/supervisor.ex @@ -0,0 +1,19 @@ +defmodule Octochat.Supervisor do + @moduledoc """ + Octochat OTP Supervisor tree + """ + + use Supervisor + + def start_link do + Supervisor.start_link(__MODULE__, [], name: __MODULE__) + end + + def init(_) do + children = [] + + opts = [strategy: :one_for_one] + supervise(children, opts) + end + +end -- cgit v1.2.1