Permalink
Browse files

Merge pull request #68 from basho/skel-priv-dir

App skeleton priv dir
  • Loading branch information...
vinoski committed May 1, 2012
2 parents 656aa69 + 53ee824 commit 8b2a7d5d1dc5988e356351517213b757a03c8e4e
Showing with 4 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +3 −3 priv/templates/src/wmskel_sup.erl
View
@@ -1,2 +1,3 @@
deps/*
*.beam
+.eunit/*
@@ -42,9 +42,9 @@ upgrade() ->
%% @doc supervisor callback.
init([]) ->
Ip = case os:getenv("WEBMACHINE_IP") of false -> "0.0.0.0"; Any -> Any end,
- {ok, Dispatch} = file:consult(filename:join(
- [filename:dirname(code:which(?MODULE)),
- "..", "priv", "dispatch.conf"])),
+ {ok, App} = application:get_application(?MODULE),
+ {ok, Dispatch} = file:consult(filename:join([code:priv_dir(App),
+ "dispatch.conf"])),
WebConfig = [
{ip, Ip},
{port, 8000},

0 comments on commit 8b2a7d5

Please sign in to comment.