Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
add bootstrap
  • Loading branch information
janl committed Oct 31, 2014
1 parent f28d896 commit 3621725d7c3761bbede21945821aa13508c26d82
Showing 3 changed files with 55 additions and 0 deletions.
@@ -0,0 +1,12 @@
{application, setup,
[
{description, ""},
{vsn, "1"},
{registered, []},
{applications, [
kernel,
stdlib
]},
{mod, { setup_app, []}},
{env, []}
]}.
@@ -0,0 +1,16 @@
-module(setup_app).

-behaviour(application).

%% Application callbacks
-export([start/2, stop/1]).

%% ===================================================================
%% Application callbacks
%% ===================================================================

start(_StartType, _StartArgs) ->
setup_sup:start_link().

stop(_State) ->
ok.
@@ -0,0 +1,27 @@
-module(setup_sup).

-behaviour(supervisor).

%% API
-export([start_link/0]).

%% Supervisor callbacks
-export([init/1]).

%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).

%% ===================================================================
%% API functions
%% ===================================================================

start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).

%% ===================================================================
%% Supervisor callbacks
%% ===================================================================

init([]) ->
{ok, { {one_for_one, 5, 10}, []} }.

0 comments on commit 3621725

Please sign in to comment.