aboutsummaryrefslogtreecommitdiffstats
path: root/examples/static
diff options
context:
space:
mode:
Diffstat (limited to 'examples/static')
-rw-r--r--examples/static/src/static.erl1
-rw-r--r--examples/static/src/static_app.erl7
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/static/src/static.erl b/examples/static/src/static.erl
index a542adb..c3f4035 100644
--- a/examples/static/src/static.erl
+++ b/examples/static/src/static.erl
@@ -8,5 +8,6 @@
%% API.
start() ->
+ ok = application:start(ranch),
ok = application:start(cowboy),
ok = application:start(static).
diff --git a/examples/static/src/static_app.erl b/examples/static/src/static_app.erl
index 3fba707..b919c27 100644
--- a/examples/static/src/static_app.erl
+++ b/examples/static/src/static_app.erl
@@ -18,10 +18,9 @@ start(_Type, _Args) ->
]}
]}
],
- {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}
+ ]),
static_sup:start_link().
stop(_State) ->