aboutsummaryrefslogtreecommitdiffstats
path: root/examples/ssl_hello_world/src/ssl_hello_world_app.erl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ssl_hello_world/src/ssl_hello_world_app.erl')
-rw-r--r--examples/ssl_hello_world/src/ssl_hello_world_app.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/ssl_hello_world/src/ssl_hello_world_app.erl b/examples/ssl_hello_world/src/ssl_hello_world_app.erl
index ae8f0cf..3e53818 100644
--- a/examples/ssl_hello_world/src/ssl_hello_world_app.erl
+++ b/examples/ssl_hello_world/src/ssl_hello_world_app.erl
@@ -16,11 +16,12 @@ start(_Type, _Args) ->
{"/", toppage_handler, []}
]}
]),
+ PrivDir = code:priv_dir(ssl_hello_world),
{ok, _} = cowboy:start_https(https, 100, [
{port, 8443},
- {cacertfile, "priv/ssl/cowboy-ca.crt"},
- {certfile, "priv/ssl/server.crt"},
- {keyfile, "priv/ssl/server.key"}
+ {cacertfile, PrivDir ++ "/ssl/cowboy-ca.crt"},
+ {certfile, PrivDir ++ "/ssl/server.crt"},
+ {keyfile, PrivDir ++ "/ssl/server.key"}
], [{env, [{dispatch, Dispatch}]}]),
ssl_hello_world_sup:start_link().