aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJordan Bracco <href@random.sh>2021-08-04 15:18:19 +0200
committerJordan Bracco <href@random.sh>2021-08-04 15:18:19 +0200
commit9fd14fc8d6d5e5e65ec44144c09908e582a3fefe (patch)
tree0ac9928c06fc78590beb948234fe488cbeefdabe /apps
New rebar app
Diffstat (limited to 'apps')
-rw-r--r--apps/styx/src/styx.app.src15
-rw-r--r--apps/styx/src/styx_app.erl18
-rw-r--r--apps/styx/src/styx_sup.erl35
3 files changed, 68 insertions, 0 deletions
diff --git a/apps/styx/src/styx.app.src b/apps/styx/src/styx.app.src
new file mode 100644
index 0000000..92a1e55
--- /dev/null
+++ b/apps/styx/src/styx.app.src
@@ -0,0 +1,15 @@
+{application, styx,
+ [{description, "Ory Kratos/Hydra Lightweight erlang frontend"},
+ {vsn, "0.1.0"},
+ {registered, []},
+ {mod, {styx_app, []}},
+ {applications,
+ [kernel,
+ stdlib
+ ]},
+ {env,[]},
+ {modules, []},
+
+ {licenses, ["Apache 2.0"]},
+ {links, []}
+ ]}.
diff --git a/apps/styx/src/styx_app.erl b/apps/styx/src/styx_app.erl
new file mode 100644
index 0000000..7ea35cd
--- /dev/null
+++ b/apps/styx/src/styx_app.erl
@@ -0,0 +1,18 @@
+%%%-------------------------------------------------------------------
+%% @doc styx public API
+%% @end
+%%%-------------------------------------------------------------------
+
+-module(styx_app).
+
+-behaviour(application).
+
+-export([start/2, stop/1]).
+
+start(_StartType, _StartArgs) ->
+ styx_sup:start_link().
+
+stop(_State) ->
+ ok.
+
+%% internal functions
diff --git a/apps/styx/src/styx_sup.erl b/apps/styx/src/styx_sup.erl
new file mode 100644
index 0000000..f9e812a
--- /dev/null
+++ b/apps/styx/src/styx_sup.erl
@@ -0,0 +1,35 @@
+%%%-------------------------------------------------------------------
+%% @doc styx top level supervisor.
+%% @end
+%%%-------------------------------------------------------------------
+
+-module(styx_sup).
+
+-behaviour(supervisor).
+
+-export([start_link/0]).
+
+-export([init/1]).
+
+-define(SERVER, ?MODULE).
+
+start_link() ->
+ supervisor:start_link({local, ?SERVER}, ?MODULE, []).
+
+%% sup_flags() = #{strategy => strategy(), % optional
+%% intensity => non_neg_integer(), % optional
+%% period => pos_integer()} % optional
+%% child_spec() = #{id => child_id(), % mandatory
+%% start => mfargs(), % mandatory
+%% restart => restart(), % optional
+%% shutdown => shutdown(), % optional
+%% type => worker(), % optional
+%% modules => modules()} % optional
+init([]) ->
+ SupFlags = #{strategy => one_for_all,
+ intensity => 0,
+ period => 1},
+ ChildSpecs = [],
+ {ok, {SupFlags, ChildSpecs}}.
+
+%% internal functions