From e4124de2c71564d37b3732ede0fe1542de1d6f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 27 Aug 2012 11:50:35 +0200 Subject: Switch to Ranch for connection handling This is the first of many API incompatible changes. You have been warned. --- examples/rest_hello_world/src/rest_hello_world.erl | 1 + examples/rest_hello_world/src/rest_hello_world_app.erl | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/rest_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 7a63e41..bdd24cc 100644 --- a/examples/rest_hello_world/src/rest_hello_world.erl +++ b/examples/rest_hello_world/src/rest_hello_world.erl @@ -8,5 +8,6 @@ %% API. start() -> + ok = application:start(ranch), ok = application:start(cowboy), ok = application:start(rest_hello_world). diff --git a/examples/rest_hello_world/src/rest_hello_world_app.erl b/examples/rest_hello_world/src/rest_hello_world_app.erl index 01560f0..510dbb1 100644 --- a/examples/rest_hello_world/src/rest_hello_world_app.erl +++ b/examples/rest_hello_world/src/rest_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} + ]), rest_hello_world_sup:start_link(). stop(_State) -> -- cgit v1.2.3