Просмотр исходного кода

Start crypto also in the examples and documentation

Loïc Hoguin 12 лет назад
Родитель
Сommit
160063497c

+ 3 - 1
README.md

@@ -39,7 +39,8 @@ Cowboy does nothing by default.
 
 
 Cowboy uses Ranch for handling connections, and provides convenience
 Cowboy uses Ranch for handling connections, and provides convenience
 functions to start and stop Ranch listeners. The Ranch application
 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
 The `cowboy:start_http/4` function will handle HTTP connections
 using the TCP transport. Similarly, `cowboy:start_https/4` will
 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.
 module.
 
 
 ``` erlang
 ``` erlang
+application:start(crypto),
 application:start(ranch),
 application:start(ranch),
 application:start(cowboy),
 application:start(cowboy),
 Dispatch = [
 Dispatch = [

+ 1 - 0
examples/chunked_hello_world/src/chunked_hello_world.erl

@@ -8,6 +8,7 @@
 %% API.
 %% API.
 
 
 start() ->
 start() ->
+	ok = application:start(crypto),
 	ok = application:start(ranch),
 	ok = application:start(ranch),
 	ok = application:start(cowboy),
 	ok = application:start(cowboy),
 	ok = application:start(chunked_hello_world).
 	ok = application:start(chunked_hello_world).

+ 1 - 0
examples/echo_get/src/echo_get.erl

@@ -8,6 +8,7 @@
 %% API.
 %% API.
 
 
 start() ->
 start() ->
+	ok = application:start(crypto),
 	ok = application:start(ranch),
 	ok = application:start(ranch),
 	ok = application:start(cowboy),
 	ok = application:start(cowboy),
 	ok = application:start(echo_get).
 	ok = application:start(echo_get).

+ 1 - 0
examples/echo_post/src/echo_post.erl

@@ -8,6 +8,7 @@
 %% API.
 %% API.
 
 
 start() ->
 start() ->
+	ok = application:start(crypto),
 	ok = application:start(ranch),
 	ok = application:start(ranch),
 	ok = application:start(cowboy),
 	ok = application:start(cowboy),
 	ok = application:start(echo_post).
 	ok = application:start(echo_post).

+ 1 - 0
examples/hello_world/src/hello_world.erl

@@ -8,6 +8,7 @@
 %% API.
 %% API.
 
 
 start() ->
 start() ->
+	ok = application:start(crypto),
 	ok = application:start(ranch),
 	ok = application:start(ranch),
 	ok = application:start(cowboy),
 	ok = application:start(cowboy),
 	ok = application:start(hello_world).
 	ok = application:start(hello_world).

+ 1 - 0
examples/rest_hello_world/src/rest_hello_world.erl

@@ -8,6 +8,7 @@
 %% API.
 %% API.
 
 
 start() ->
 start() ->
+	ok = application:start(crypto),
 	ok = application:start(ranch),
 	ok = application:start(ranch),
 	ok = application:start(cowboy),
 	ok = application:start(cowboy),
 	ok = application:start(rest_hello_world).
 	ok = application:start(rest_hello_world).

+ 1 - 0
examples/static/src/static.erl

@@ -8,6 +8,7 @@
 %% API.
 %% API.
 
 
 start() ->
 start() ->
+	ok = application:start(crypto),
 	ok = application:start(ranch),
 	ok = application:start(ranch),
 	ok = application:start(cowboy),
 	ok = application:start(cowboy),
 	ok = application:start(static).
 	ok = application:start(static).