diff --git a/README.md b/README.md index 246dc1bf..e6556be5 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,8 @@ Cowboy does nothing by default. Cowboy uses Ranch for handling connections, and provides convenience functions to start and stop Ranch listeners. The Ranch application -must always be started before Cowboy. +must always be started before Cowboy. The crypto application must +also be started. The `cowboy:start_http/4` function will handle HTTP connections using the TCP transport. Similarly, `cowboy:start_https/4` will @@ -57,6 +58,7 @@ HTTP listener. It redirects all requests to the `my_handler` module. ``` erlang +application:start(crypto), application:start(ranch), application:start(cowboy), Dispatch = [ diff --git a/examples/chunked_hello_world/src/chunked_hello_world.erl b/examples/chunked_hello_world/src/chunked_hello_world.erl index 5c13f0ed..78c771f9 100644 --- a/examples/chunked_hello_world/src/chunked_hello_world.erl +++ b/examples/chunked_hello_world/src/chunked_hello_world.erl @@ -8,6 +8,7 @@ %% API. start() -> + ok = application:start(crypto), ok = application:start(ranch), ok = application:start(cowboy), ok = application:start(chunked_hello_world). diff --git a/examples/echo_get/src/echo_get.erl b/examples/echo_get/src/echo_get.erl index a8f89561..6ffff41c 100644 --- a/examples/echo_get/src/echo_get.erl +++ b/examples/echo_get/src/echo_get.erl @@ -8,6 +8,7 @@ %% API. start() -> + ok = application:start(crypto), ok = application:start(ranch), ok = application:start(cowboy), ok = application:start(echo_get). diff --git a/examples/echo_post/src/echo_post.erl b/examples/echo_post/src/echo_post.erl index 9c47b9c2..c7c8ce18 100644 --- a/examples/echo_post/src/echo_post.erl +++ b/examples/echo_post/src/echo_post.erl @@ -8,6 +8,7 @@ %% API. start() -> + ok = application:start(crypto), ok = application:start(ranch), ok = application:start(cowboy), ok = application:start(echo_post). diff --git a/examples/hello_world/src/hello_world.erl b/examples/hello_world/src/hello_world.erl index 301c6d2f..d62ff4bf 100644 --- a/examples/hello_world/src/hello_world.erl +++ b/examples/hello_world/src/hello_world.erl @@ -8,6 +8,7 @@ %% API. start() -> + ok = application:start(crypto), ok = application:start(ranch), ok = application:start(cowboy), ok = application:start(hello_world). diff --git a/examples/rest_hello_world/src/rest_hello_world.erl b/examples/rest_hello_world/src/rest_hello_world.erl index bdd24cca..e2b7463b 100644 --- a/examples/rest_hello_world/src/rest_hello_world.erl +++ b/examples/rest_hello_world/src/rest_hello_world.erl @@ -8,6 +8,7 @@ %% API. start() -> + ok = application:start(crypto), ok = application:start(ranch), ok = application:start(cowboy), ok = application:start(rest_hello_world). diff --git a/examples/static/src/static.erl b/examples/static/src/static.erl index c3f40359..d3eb3192 100644 --- a/examples/static/src/static.erl +++ b/examples/static/src/static.erl @@ -8,6 +8,7 @@ %% API. start() -> + ok = application:start(crypto), ok = application:start(ranch), ok = application:start(cowboy), ok = application:start(static).