aboutsummaryrefslogtreecommitdiffstats
path: root/examples/echo_get/src/echo_get_app.erl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/echo_get/src/echo_get_app.erl')
-rw-r--r--examples/echo_get/src/echo_get_app.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/echo_get/src/echo_get_app.erl b/examples/echo_get/src/echo_get_app.erl
index b9551f0..d661e9c 100644
--- a/examples/echo_get/src/echo_get_app.erl
+++ b/examples/echo_get/src/echo_get_app.erl
@@ -11,13 +11,13 @@
%% API.
start(_Type, _Args) ->
- Dispatch = [
+ Dispatch = cowboy_router:compile([
{'_', [
- {[], toppage_handler, []}
+ {"/", toppage_handler, []}
]}
- ],
+ ]),
{ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [
- {dispatch, Dispatch}
+ {env, [{dispatch, Dispatch}]}
]),
echo_get_sup:start_link().