aboutsummaryrefslogtreecommitdiffstats
path: root/examples/echo_get
diff options
context:
space:
mode:
Diffstat (limited to 'examples/echo_get')
-rw-r--r--examples/echo_get/src/echo_get.erl1
-rw-r--r--examples/echo_get/src/echo_get_app.erl7
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/echo_get/src/echo_get.erl b/examples/echo_get/src/echo_get.erl
index 81d0f43..a8f8956 100644
--- a/examples/echo_get/src/echo_get.erl
+++ b/examples/echo_get/src/echo_get.erl
@@ -8,5 +8,6 @@
%% API.
start() ->
+ ok = application:start(ranch),
ok = application:start(cowboy),
ok = application:start(echo_get).
diff --git a/examples/echo_get/src/echo_get_app.erl b/examples/echo_get/src/echo_get_app.erl
index 8220bd3..b9551f0 100644
--- a/examples/echo_get/src/echo_get_app.erl
+++ b/examples/echo_get/src/echo_get_app.erl
@@ -16,10 +16,9 @@ start(_Type, _Args) ->
{[], toppage_handler, []}
]}
],
- {ok, _} = cowboy:start_listener(http, 100,
- cowboy_tcp_transport, [{port, 8080}],
- cowboy_http_protocol, [{dispatch, Dispatch}]
- ),
+ {ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [
+ {dispatch, Dispatch}
+ ]),
echo_get_sup:start_link().
stop(_State) ->