aboutsummaryrefslogtreecommitdiffstats
path: root/examples/chunked_hello_world/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/chunked_hello_world/src')
-rw-r--r--examples/chunked_hello_world/src/chunked_hello_world.erl1
-rw-r--r--examples/chunked_hello_world/src/chunked_hello_world_app.erl7
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/chunked_hello_world/src/chunked_hello_world.erl b/examples/chunked_hello_world/src/chunked_hello_world.erl
index 5f3ddf8..5c13f0e 100644
--- a/examples/chunked_hello_world/src/chunked_hello_world.erl
+++ b/examples/chunked_hello_world/src/chunked_hello_world.erl
@@ -8,5 +8,6 @@
%% API.
start() ->
+ ok = application:start(ranch),
ok = application:start(cowboy),
ok = application:start(chunked_hello_world).
diff --git a/examples/chunked_hello_world/src/chunked_hello_world_app.erl b/examples/chunked_hello_world/src/chunked_hello_world_app.erl
index 0fc1b8b..41efd06 100644
--- a/examples/chunked_hello_world/src/chunked_hello_world_app.erl
+++ b/examples/chunked_hello_world/src/chunked_hello_world_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}
+ ]),
chunked_hello_world_sup:start_link().
stop(_State) ->