diff options
Diffstat (limited to 'priv/templates/simpleapp_app.erl')
-rw-r--r-- | priv/templates/simpleapp_app.erl | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/priv/templates/simpleapp_app.erl b/priv/templates/simpleapp_app.erl deleted file mode 100644 index 8c645ca..0000000 --- a/priv/templates/simpleapp_app.erl +++ /dev/null @@ -1,55 +0,0 @@ -%%%------------------------------------------------------------------- -%% @copyright {{copyright_holder}} ({{copyright_year}}) -%% @author {{author_name}} <{{author_email}}> -%% @doc {{appid}} OTP application callback module. -%% @end -%%%------------------------------------------------------------------- - --module({{appid}}_app). - --behaviour(application). - --define(APP, {{appid}}). - -%% Application callbacks --export([start/2, stop/1]). - --export([config/0, config/1, config/2, - start/0]). - -%%%=================================================================== -%%% Convenience Functions -%%%=================================================================== - -start() -> - application:ensure_all_started(?APP, permanent). - -config(Key, Default) -> - case application:get_env(?APP, Key) of - undefined -> Default; - {ok, Val} -> Val - end. - -config(Key) -> - case application:get_env(?APP, Key) of - undefined -> erlang:error({missing_config, Key}); - {ok, Val} -> Val - end. - -config() -> - application:get_all_env(?APP). - - -%% =================================================================== -%% Application callbacks -%% =================================================================== - -start(_StartType, _StartArgs) -> - {{appid}}_sup:start_link(). - -stop(_State) -> - ok. - -%%%=================================================================== -%%% Internal functions -%%%=================================================================== |