summaryrefslogtreecommitdiff
path: root/src/simplec_app.erl
blob: 5936dd08ad67d976770c4451ad71c8db93a00b20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-module(simplec_app).

-behaviour(application).

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

-include("simplec.hrl").

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

start(_StartType, _StartArgs) ->
    {ok, Uri} = application:get_env(simplec, uri),
    {ok, Dir} = application:get_env(simplec, dir),
    C = #config{url=Uri, dir=Dir},
    simplec_sup:start_link(C).

stop(_State) ->
    ok.