Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
using ensure_started instead of starting inets directly, added dep in…
… .app.src, updated start/stop
  • Loading branch information
capotej committed Mar 27, 2011
1 parent 944d19e commit 5c574a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions priv/templates/src/wmskel.app.src
Expand Up @@ -8,6 +8,7 @@
{applications, [
kernel,
stdlib,
inets,
crypto,
mochiweb,
webmachine
Expand Down
4 changes: 3 additions & 1 deletion priv/templates/src/wmskel.erl
Expand Up @@ -18,6 +18,7 @@ ensure_started(App) ->
%% @spec start_link() -> {ok,Pid::pid()}
%% @doc Starts the app for inclusion in a supervisor tree
start_link() ->
ensure_started(inets),
ensure_started(crypto),
ensure_started(mochiweb),
application:set_env(webmachine, webmachine_logger_module,
Expand All @@ -28,7 +29,7 @@ start_link() ->
%% @spec start() -> ok
%% @doc Start the {{appid}} server.
start() ->
inets:start(),
ensure_started(inets),
ensure_started(crypto),
ensure_started(mochiweb),
application:set_env(webmachine, webmachine_logger_module,
Expand All @@ -43,4 +44,5 @@ stop() ->
application:stop(webmachine),
application:stop(mochiweb),
application:stop(crypto),
application:stop(inets),
Res.

0 comments on commit 5c574a8

Please sign in to comment.