Skip to content

Commit

Permalink
add support for WEBMACHINE_PORT environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelneale authored and vinoski committed Oct 23, 2012
1 parent 67025db commit bcab56a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion priv/templates/src/wmskel_sup.erl
Expand Up @@ -45,9 +45,13 @@ init([]) ->
{ok, App} = application:get_application(?MODULE),
{ok, Dispatch} = file:consult(filename:join([priv_dir(App),
"dispatch.conf"])),
Port = case os:getenv("WEBMACHINE_PORT") of
false -> 8000;
AnyPort -> AnyPort
end,
WebConfig = [
{ip, Ip},
{port, 8000},
{port, Port},
{log_dir, "priv/log"},
{dispatch, Dispatch}],
Web = {webmachine_mochiweb,
Expand Down

0 comments on commit bcab56a

Please sign in to comment.