Skip to content

Commit

Permalink
Start crypto also in the examples and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
essen committed Oct 11, 2012
1 parent 7b3d994 commit 1600634
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -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
Expand All @@ -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 = [
Expand Down
1 change: 1 addition & 0 deletions examples/chunked_hello_world/src/chunked_hello_world.erl
Expand Up @@ -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 change: 1 addition & 0 deletions examples/echo_get/src/echo_get.erl
Expand Up @@ -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 change: 1 addition & 0 deletions examples/echo_post/src/echo_post.erl
Expand Up @@ -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 change: 1 addition & 0 deletions examples/hello_world/src/hello_world.erl
Expand Up @@ -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 change: 1 addition & 0 deletions examples/rest_hello_world/src/rest_hello_world.erl
Expand Up @@ -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 change: 1 addition & 0 deletions examples/static/src/static.erl
Expand Up @@ -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).

0 comments on commit 1600634

Please sign in to comment.