PageRenderTime 37ms CodeModel.GetById 26ms RepoModel.GetById 1ms app.codeStats 0ms

/priv/skel/src/skel.erl

http://github.com/basho/mochiweb
Erlang | 30 lines | 18 code | 5 blank | 7 comment | 0 complexity | 21985167eb7c5aaf87f89d2691dd9e3e MD5 | raw file
Possible License(s): MIT
  1. %% @author author <author@example.com>
  2. %% @copyright YYYY author.
  3. %% @doc TEMPLATE.
  4. -module(skel).
  5. -author('author <author@example.com>').
  6. -export([start/0, stop/0]).
  7. ensure_started(App) ->
  8. case application:start(App) of
  9. ok ->
  10. ok;
  11. {error, {already_started, App}} ->
  12. ok
  13. end.
  14. %% @spec start() -> ok
  15. %% @doc Start the skel server.
  16. start() ->
  17. skel_deps:ensure(),
  18. ensure_started(crypto),
  19. application:start(skel).
  20. %% @spec stop() -> ok
  21. %% @doc Stop the skel server.
  22. stop() ->
  23. Res = application:stop(skel),
  24. application:stop(crypto),
  25. Res.