Initial directory struct + OTP stuffs

This commit is contained in:
Jonatan Pålsson 2011-01-25 13:38:32 +01:00
parent a44a538ac6
commit c88dcf7829
13 changed files with 160 additions and 0 deletions

20
src/ggs_sup.erl Normal file
View file

@ -0,0 +1,20 @@
-module(ggs_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init([]) ->
Server = {ggs_server, {ggs_server, start_link, []},
permanent, 2000, worker, [ggs_server]},
Children = [Server],
RestartStrategy = {one_for_one, 0, 1},
{ok, {RestartStrategy, Children}}.