aboutsummaryrefslogtreecommitdiffstats
path: root/examples/upload
diff options
context:
space:
mode:
Diffstat (limited to 'examples/upload')
-rw-r--r--examples/upload/src/upload_app.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/upload/src/upload_app.erl b/examples/upload/src/upload_app.erl
index 5285c0f..468d15d 100644
--- a/examples/upload/src/upload_app.erl
+++ b/examples/upload/src/upload_app.erl
@@ -13,12 +13,12 @@ start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
{"/", cowboy_static, {priv_file, upload, "index.html"}},
- {"/upload", upload_handler, []},
- {"/files/[...]", cowboy_static, {priv_dir, upload, "files"}}
+ {"/upload", upload_handler, []}
]}
]),
- {ok, _} = cowboy:start_http(http, 100, [{port, 8080}],
- [{env, [{dispatch, Dispatch}]}]),
+ {ok, _} = cowboy:start_clear(http, 100, [{port, 8080}], #{
+ env => #{dispatch => Dispatch}
+ }),
upload_sup:start_link().
stop(_State) ->