flm01/server/api/webmachine/demo/src/webmachine_demo.erl

28 lines
638 B
Erlang
Raw Normal View History

2010-02-25 17:45:11 +00:00
-module(webmachine_demo).
-author('Andy Gross <andy@basho.com>').
-author('Justin Sheehy <justin@@basho.com>').
-export([start/0, stop/0]).
ensure_started(App) ->
case application:start(App) of
ok ->
ok;
{error, {already_started, App}} ->
ok
end.
%% @spec start() -> ok
%% @doc Start the webmachine_demo server.
start() ->
ensure_started(crypto),
ensure_started(webmachine),
application:start(webmachine_demo).
%% @spec stop() -> ok
%% @doc Stop the webmachine_demo server.
stop() ->
Res = application:stop(webmachine_demo),
application:stop(webmachine),
application:stop(crypto),
Res.