mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Switch to Ranch for connection handling
This is the first of many API incompatible changes. You have been warned.
This commit is contained in:
parent
50e5a616dc
commit
e4124de2c7
35 changed files with 133 additions and 1066 deletions
|
@ -8,5 +8,6 @@
|
|||
%% API.
|
||||
|
||||
start() ->
|
||||
ok = application:start(ranch),
|
||||
ok = application:start(cowboy),
|
||||
ok = application:start(hello_world).
|
||||
|
|
|
@ -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}
|
||||
]),
|
||||
hello_world_sup:start_link().
|
||||
|
||||
stop(_State) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue