From 97f8b41a5f48db0207026e8ac2ec7c8a5508b773 Mon Sep 17 00:00:00 2001 From: toastal Date: Wed, 14 Dec 2022 17:31:51 +0700 Subject: [PATCH] move shell session blocks to appropriate syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One of these script was mislabled at `shell` when it wasn’t a shell script but a shell session. The following block while it is technically JSON, is more appropriately the stdout from cURL in that shell session. --- README.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 4638dbb..27c03e1 100644 --- a/README.md +++ b/README.md @@ -125,19 +125,14 @@ let _ = compile and run with: -```sh +``` sh-session $ dune exec examples/hello_world.exe & ``` -then call - -```sh -curl http://localhost:3000/person/john_doe/42 -``` - -You should see the greeting +then make a request to be greeted with a JSON response -```json +``` sh-session +$ curl http://localhost:3000/person/john_doe/42 {"name":"john_doe","age":42} ``` @@ -198,7 +193,7 @@ Here we also use the ability of Opium to generate a cmdliner term to run your app. Run your executable with `--help` to see the options that are available to you. For example: -``` +```sh-session # run in debug mode on port 9000 $ dune exec example/simple_middleware/main.exe -- -p 9000 -d ```