mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 04:10:24 +00:00
Remove NumAcceptors argument from start_clear/tls
They are now cowboy:start_clear/3 and cowboy:start_tls/3. The NumAcceptors argument can be specified via the num_acceptor transport option. Ranch has been updated to 1.4.0 to that effect.
This commit is contained in:
parent
767da623f1
commit
6f7b59886e
30 changed files with 45 additions and 83 deletions
|
@ -16,7 +16,7 @@ start(_Type, _Args) ->
|
|||
{"/", toppage_handler, []}
|
||||
]}
|
||||
]),
|
||||
{ok, _} = cowboy:start_clear(http, 100, [{port, 8080}], #{
|
||||
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
|
||||
env => #{dispatch => Dispatch}
|
||||
}),
|
||||
chunked_hello_world_sup:start_link().
|
||||
|
|
|
@ -16,7 +16,7 @@ start(_Type, _Args) ->
|
|||
{"/", toppage_handler, []}
|
||||
]}
|
||||
]),
|
||||
{ok, _} = cowboy:start_clear(http, 100, [{port, 8080}], #{
|
||||
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
|
||||
env => #{dispatch => Dispatch},
|
||||
stream_handlers => [cowboy_compress_h, cowboy_stream_h]
|
||||
}),
|
||||
|
|
|
@ -16,7 +16,7 @@ start(_Type, _Args) ->
|
|||
{'_', toppage_handler, []}
|
||||
]}
|
||||
]),
|
||||
{ok, _} = cowboy:start_clear(http, 100, [{port, 8080}], #{
|
||||
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
|
||||
env => #{dispatch => Dispatch}
|
||||
}),
|
||||
cookie_sup:start_link().
|
||||
|
|
|
@ -16,7 +16,7 @@ start(_Type, _Args) ->
|
|||
{"/", toppage_handler, []}
|
||||
]}
|
||||
]),
|
||||
{ok, _} = cowboy:start_clear(http, 100, [{port, 8080}], #{
|
||||
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
|
||||
env => #{dispatch => Dispatch}
|
||||
}),
|
||||
echo_get_sup:start_link().
|
||||
|
|
|
@ -16,7 +16,7 @@ start(_Type, _Args) ->
|
|||
{"/", toppage_handler, []}
|
||||
]}
|
||||
]),
|
||||
{ok, _} = cowboy:start_clear(http, 100, [{port, 8080}], #{
|
||||
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
|
||||
env => #{dispatch => Dispatch}
|
||||
}),
|
||||
echo_post_sup:start_link().
|
||||
|
|
|
@ -17,7 +17,7 @@ start(_Type, _Args) ->
|
|||
{"/", cowboy_static, {priv_file, eventsource, "index.html"}}
|
||||
]}
|
||||
]),
|
||||
{ok, _} = cowboy:start_clear(http, 100, [{port, 8080}], #{
|
||||
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
|
||||
env => #{dispatch => Dispatch}
|
||||
}),
|
||||
eventsource_sup:start_link().
|
||||
|
|
|
@ -19,7 +19,7 @@ start(_Type, _Args) ->
|
|||
]}}
|
||||
]}
|
||||
]),
|
||||
{ok, _} = cowboy:start_clear(http, 100, [{port, 8080}], #{
|
||||
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
|
||||
env => #{dispatch => Dispatch},
|
||||
middlewares => [cowboy_router, directory_lister, cowboy_handler]
|
||||
}),
|
||||
|
|
|
@ -16,7 +16,7 @@ start(_Type, _Args) ->
|
|||
{"/", toppage_handler, []}
|
||||
]}
|
||||
]),
|
||||
{ok, _} = cowboy:start_clear(http, 100, [{port, 8080}], #{
|
||||
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
|
||||
env => #{dispatch => Dispatch}
|
||||
}),
|
||||
hello_world_sup:start_link().
|
||||
|
|
|
@ -16,7 +16,7 @@ start(_Type, _Args) ->
|
|||
{"/[...]", cowboy_static, {priv_dir, markdown_middleware, ""}}
|
||||
]}
|
||||
]),
|
||||
{ok, _} = cowboy:start_clear(http, 100, [{port, 8080}], #{
|
||||
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
|
||||
env => #{dispatch => Dispatch},
|
||||
middlewares => [cowboy_router, markdown_converter, cowboy_handler]
|
||||
}),
|
||||
|
|
|
@ -16,7 +16,7 @@ start(_Type, _Args) ->
|
|||
{"/", toppage_handler, []}
|
||||
]}
|
||||
]),
|
||||
{ok, _} = cowboy:start_clear(http, 100, [{port, 8080}], #{
|
||||
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
|
||||
env => #{dispatch => Dispatch}
|
||||
}),
|
||||
rest_basic_auth_sup:start_link().
|
||||
|
|
|
@ -16,7 +16,7 @@ start(_Type, _Args) ->
|
|||
{"/", toppage_handler, []}
|
||||
]}
|
||||
]),
|
||||
{ok, _} = cowboy:start_clear(http, 100, [{port, 8080}], #{
|
||||
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
|
||||
env => #{dispatch => Dispatch}
|
||||
}),
|
||||
rest_hello_world_sup:start_link().
|
||||
|
|
|
@ -16,7 +16,7 @@ start(_Type, _Args) ->
|
|||
{"/[:paste_id]", toppage_handler, []}
|
||||
]}
|
||||
]),
|
||||
{ok, _} = cowboy:start_clear(http, 100, [{port, 8080}], #{
|
||||
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
|
||||
env => #{dispatch => Dispatch}
|
||||
}),
|
||||
rest_pastebin_sup:start_link().
|
||||
|
|
|
@ -17,7 +17,7 @@ start(_Type, _Args) ->
|
|||
]}
|
||||
]),
|
||||
PrivDir = code:priv_dir(ssl_hello_world),
|
||||
{ok, _} = cowboy:start_tls(https, 100, [
|
||||
{ok, _} = cowboy:start_tls(https, [
|
||||
{port, 8443},
|
||||
{cacertfile, PrivDir ++ "/ssl/cowboy-ca.crt"},
|
||||
{certfile, PrivDir ++ "/ssl/server.crt"},
|
||||
|
|
|
@ -16,7 +16,7 @@ start(_Type, _Args) ->
|
|||
{"/upload", upload_handler, []}
|
||||
]}
|
||||
]),
|
||||
{ok, _} = cowboy:start_clear(http, 100, [{port, 8080}], #{
|
||||
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
|
||||
env => #{dispatch => Dispatch}
|
||||
}),
|
||||
upload_sup:start_link().
|
||||
|
|
|
@ -17,7 +17,7 @@ start(_Type, _Args) ->
|
|||
{"/static/[...]", cowboy_static, {priv_dir, websocket, "static"}}
|
||||
]}
|
||||
]),
|
||||
{ok, _} = cowboy:start_clear(http, 100, [{port, 8080}], #{
|
||||
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
|
||||
env => #{dispatch => Dispatch}
|
||||
}),
|
||||
websocket_sup:start_link().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue