aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-06-16 22:17:14 +0200
committerLoïc Hoguin <[email protected]>2016-06-16 22:17:14 +0200
commit57901a71160e2592d999efb564bef4a50876d6b1 (patch)
tree0c7debee50980664f35d139504b66f9fb33e83f1 /examples
parent44f16f3b1e431b1b270d75b082bff3657c1e7788 (diff)
downloadcowboy-57901a71160e2592d999efb564bef4a50876d6b1.tar.gz
cowboy-57901a71160e2592d999efb564bef4a50876d6b1.tar.bz2
cowboy-57901a71160e2592d999efb564bef4a50876d6b1.zip
Fix upload example
Diffstat (limited to 'examples')
-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) ->