From 76a8d6c06ad7d2cb01e31237ade1a1fab9cef022 Mon Sep 17 00:00:00 2001 From: Anton Bachin Date: Mon, 5 Apr 2021 00:57:34 +0300 Subject: [PATCH] Make example/4-counter a bit nicer --- example/4-counter/README.md | 4 ++-- example/4-counter/counter.ml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/4-counter/README.md b/example/4-counter/README.md index 0b77ede..2af7ab3 100644 --- a/example/4-counter/README.md +++ b/example/4-counter/README.md @@ -4,7 +4,7 @@ This example shows how easy it is to define a custom middleware, `count_requests`. It exposes the request count at -[http://localhost:8080/dashboard](http://localhost:8080/dashboard): +[http://localhost:8080/](http://localhost:8080/) in a sort of dashboard: ```ocaml let count = ref 0 @@ -18,7 +18,7 @@ let () = @@ Dream.logger @@ count_requests @@ Dream.router [ - Dream.get "/dashboard" (fun _ -> + Dream.get "/" (fun _ -> Dream.respond (Printf.sprintf "Saw %i request(s)!" !count)); ] @@ Dream.not_found diff --git a/example/4-counter/counter.ml b/example/4-counter/counter.ml index 46c6263..e746406 100644 --- a/example/4-counter/counter.ml +++ b/example/4-counter/counter.ml @@ -9,7 +9,7 @@ let () = @@ Dream.logger @@ count_requests @@ Dream.router [ - Dream.get "/dashboard" (fun _ -> + Dream.get "/" (fun _ -> Dream.respond (Printf.sprintf "Saw %i request(s)!" !count)); ] @@ Dream.not_found