summaryrefslogtreecommitdiff
path: root/src/simplec_app.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/simplec_app.erl')
-rw-r--r--src/simplec_app.erl21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/simplec_app.erl b/src/simplec_app.erl
new file mode 100644
index 0000000..5936dd0
--- /dev/null
+++ b/src/simplec_app.erl
@@ -0,0 +1,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.