diff options
Diffstat (limited to 'examples/basic_auth')
-rw-r--r-- | examples/basic_auth/README.md | 5 | ||||
-rw-r--r-- | examples/basic_auth/src/basic_auth_app.erl | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/examples/basic_auth/README.md b/examples/basic_auth/README.md index 74662cd..38ae9a2 100644 --- a/examples/basic_auth/README.md +++ b/examples/basic_auth/README.md @@ -1,5 +1,5 @@ -Cowboy Basic Authorization Rest Hello World. -============================================ +Cowboy Basic Authorization Rest Hello World +=========================================== To compile this example you need rebar in your PATH. @@ -41,4 +41,3 @@ content-type: text/plain Hello, Alladin! ``` - diff --git a/examples/basic_auth/src/basic_auth_app.erl b/examples/basic_auth/src/basic_auth_app.erl index c60a574..24c766e 100644 --- a/examples/basic_auth/src/basic_auth_app.erl +++ b/examples/basic_auth/src/basic_auth_app.erl @@ -11,11 +11,11 @@ %% API. start(_Type, _Args) -> - Dispatch = [ + Dispatch = cowboy_router:compile([ {'_', [ - {[], toppage_handler, []} + {"/", toppage_handler, []} ]} - ], + ]), {ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [ {env, [{dispatch, Dispatch}]} ]), |