summaryrefslogtreecommitdiff
path: root/priv/templates/simpleapp_sup.erl
diff options
context:
space:
mode:
Diffstat (limited to 'priv/templates/simpleapp_sup.erl')
-rw-r--r--priv/templates/simpleapp_sup.erl26
1 files changed, 18 insertions, 8 deletions
diff --git a/priv/templates/simpleapp_sup.erl b/priv/templates/simpleapp_sup.erl
index 477479f..7c13fa1 100644
--- a/priv/templates/simpleapp_sup.erl
+++ b/priv/templates/simpleapp_sup.erl
@@ -1,3 +1,10 @@
+%%%-------------------------------------------------------------------
+%% @copyright {{copyright_holder}} ({{copyright_year}})
+%% @author {{author_name}} <{{author_email}}>
+%% @doc {{appid}} top level supervisor.
+%% @end
+%%%-------------------------------------------------------------------
+
-module({{appid}}_sup).
-behaviour(supervisor).
@@ -8,20 +15,23 @@
%% Supervisor callbacks
-export([init/1]).
-%% Helper macro for declaring children of supervisor
--define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
+-define(SERVER, ?MODULE).
-%% ===================================================================
+%%====================================================================
%% API functions
-%% ===================================================================
+%%====================================================================
start_link() ->
- supervisor:start_link({local, ?MODULE}, ?MODULE, []).
+ supervisor:start_link({local, ?SERVER}, ?MODULE, []).
-%% ===================================================================
+%%====================================================================
%% Supervisor callbacks
-%% ===================================================================
+%%====================================================================
+%% Child :: {Id,StartFunc,Restart,Shutdown,Type,Modules}
init([]) ->
- {ok, { {one_for_one, 5, 10}, []} }.
+ {ok, { {one_for_all, 0, 1}, []} }.
+%%====================================================================
+%% Internal functions
+%%====================================================================