Initial directory struct + OTP stuffs
This commit is contained in:
parent
a44a538ac6
commit
c88dcf7829
13 changed files with 160 additions and 0 deletions
20
src/ggs_sup.erl
Normal file
20
src/ggs_sup.erl
Normal 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}}.
|
||||
|
Reference in a new issue