diff options
Diffstat (limited to 'examples/echo_post/src/echo_post_app.erl')
-rw-r--r-- | examples/echo_post/src/echo_post_app.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/echo_post/src/echo_post_app.erl b/examples/echo_post/src/echo_post_app.erl index 93f3bd5..7d86c53 100644 --- a/examples/echo_post/src/echo_post_app.erl +++ b/examples/echo_post/src/echo_post_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_post_sup:start_link(). |