Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

src

  • Loading branch information...
commit 0ce2f022d331dd9ee2755eb72f2bcccf2cf870e7 1 parent b47383f
Daniel Widgren authored
12  src/italian_western.app.src
... ...
@@ -0,0 +1,12 @@
  1
+{application, italian_western,
  2
+ [
  3
+  {description, ""},
  4
+  {vsn, "1"},
  5
+  {registered, []},
  6
+  {applications, [
  7
+                  kernel,
  8
+                  stdlib
  9
+                 ]},
  10
+  {mod, { italian_western_app, []}},
  11
+  {env, []}
  12
+ ]}.
16  src/italian_western_app.erl
... ...
@@ -0,0 +1,16 @@
  1
+-module(italian_western_app).
  2
+
  3
+-behaviour(application).
  4
+
  5
+%% Application callbacks
  6
+-export([start/2, stop/1]).
  7
+
  8
+%% ===================================================================
  9
+%% Application callbacks
  10
+%% ===================================================================
  11
+
  12
+start(_StartType, _StartArgs) ->
  13
+    italian_western_sup:start_link().
  14
+
  15
+stop(_State) ->
  16
+    ok.
28  src/italian_western_sup.erl
... ...
@@ -0,0 +1,28 @@
  1
+
  2
+-module(italian_western_sup).
  3
+
  4
+-behaviour(supervisor).
  5
+
  6
+%% API
  7
+-export([start_link/0]).
  8
+
  9
+%% Supervisor callbacks
  10
+-export([init/1]).
  11
+
  12
+%% Helper macro for declaring children of supervisor
  13
+-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
  14
+
  15
+%% ===================================================================
  16
+%% API functions
  17
+%% ===================================================================
  18
+
  19
+start_link() ->
  20
+    supervisor:start_link({local, ?MODULE}, ?MODULE, []).
  21
+
  22
+%% ===================================================================
  23
+%% Supervisor callbacks
  24
+%% ===================================================================
  25
+
  26
+init([]) ->
  27
+    {ok, { {one_for_one, 5, 10}, []} }.
  28
+

0 notes on commit 0ce2f02

Please sign in to comment.
Something went wrong with that request. Please try again.