diff options
author | Loïc Hoguin <[email protected]> | 2013-09-08 20:17:25 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2013-09-08 20:17:25 +0200 |
commit | 24a22fa657af8398c963889d0bf08a904c96ec8c (patch) | |
tree | 0f3e2b39c1e700dadbc7afde176fb1f6600e30e0 /examples/ssl_hello_world/src/ssl_hello_world_app.erl | |
parent | 1f8119ef311911c3bc4567a198abd0237db6710d (diff) | |
download | cowboy-24a22fa657af8398c963889d0bf08a904c96ec8c.tar.gz cowboy-24a22fa657af8398c963889d0bf08a904c96ec8c.tar.bz2 cowboy-24a22fa657af8398c963889d0bf08a904c96ec8c.zip |
Convert the SSL hello world example to a release
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.erl | 7 |
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(). |