PageRenderTime 140ms CodeModel.GetById 138ms app.highlight 1ms 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
 1%% @author author <author@example.com>
 2%% @copyright YYYY author.
 3
 4%% @doc TEMPLATE.
 5
 6-module(skel).
 7-author('author <author@example.com>').
 8-export([start/0, stop/0]).
 9
10ensure_started(App) ->
11    case application:start(App) of
12        ok ->
13            ok;
14        {error, {already_started, App}} ->
15            ok
16    end.
17
18%% @spec start() -> ok
19%% @doc Start the skel server.
20start() ->
21    skel_deps:ensure(),
22    ensure_started(crypto),
23    application:start(skel).
24
25%% @spec stop() -> ok
26%% @doc Stop the skel server.
27stop() ->
28    Res = application:stop(skel),
29    application:stop(crypto),
30    Res.