summaryrefslogtreecommitdiff
path: root/src/catlfish_sup.erl
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2014-10-24 13:23:59 +0200
committerLinus Nordberg <linus@nordberg.se>2014-10-24 13:23:59 +0200
commit86419f500e74386a4613d4cee0aab66e129d7ed5 (patch)
tree353d70fb6fe1afca09e2194615f4ecde7bbec8a0 /src/catlfish_sup.erl
parenteedde90ea02f32a6fa3f32b3cafeb0b2614cbd11 (diff)
Whitespace.
No long lines.
Diffstat (limited to 'src/catlfish_sup.erl')
-rw-r--r--src/catlfish_sup.erl35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/catlfish_sup.erl b/src/catlfish_sup.erl
index 143e601..abdac44 100644
--- a/src/catlfish_sup.erl
+++ b/src/catlfish_sup.erl
@@ -10,22 +10,25 @@ start_link(_Args) ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
- SSLOptions = [{certfile, application:get_env(catlfish, https_certfile, none)},
- {keyfile, application:get_env(catlfish, https_keyfile, none)},
- {cacertfile, application:get_env(catlfish, https_cacertfile, none)}],
- Servers = lists:map(fun (Config) ->
- {IpAddress, Port, Module} = Config,
- {ok, IPv4Address} = inet:parse_ipv4strict_address(IpAddress),
- WebConfig = [{ip, IPv4Address},
- {port, Port},
- {ssl, true},
- {ssl_opts, SSLOptions}
- ],
- {catlfish_web,
- {catlfish_web, start, [WebConfig, Module]},
- permanent, 5000,
- worker, dynamic}
- end, application:get_env(catlfish, https_servers, [])),
+ SSLOptions =
+ [{certfile, application:get_env(catlfish, https_certfile, none)},
+ {keyfile, application:get_env(catlfish, https_keyfile, none)},
+ {cacertfile, application:get_env(catlfish, https_cacertfile, none)}],
+ Servers =
+ lists:map(fun (Config) ->
+ {IpAddress, Port, Module} = Config,
+ {ok, IPv4Address} =
+ inet:parse_ipv4strict_address(IpAddress),
+ WebConfig = [{ip, IPv4Address},
+ {port, Port},
+ {ssl, true},
+ {ssl_opts, SSLOptions}
+ ],
+ {catlfish_web,
+ {catlfish_web, start, [WebConfig, Module]},
+ permanent, 5000,
+ worker, dynamic}
+ end, application:get_env(catlfish, https_servers, [])),
{ok,
{{one_for_one, 3, 10},
Servers}}.