Compile with:
$ dune build example/simple_middleware/main.ml
Here we also use the ability of Opium to generate a cmdliner term to run your app. Run your executable with -h to see the options that are available to you. For example:
# run in debug mode on port 9000
$ dune exec dune build example/simple_middleware/main.exe -- -p 9000 -d
I think the last line should be on of dune exec or dune build. Also, running with the -h flag gets you, assuming that command is correct:
~/Github/opium-0.20.0 main 3.0.1
❯ dune build example/simple_middleware/main.re
~/Github/opium-0.20.0 main 3.0.1
❯ dune exec example/simple_middleware/main.exe -- -p 9000 -h
Reject UA: option `-h' needs an argument
Usage: Reject UA [OPTION]...
Try `Reject UA --help' for more information.
At the bottom of the docs you have:
I think the last line should be on of
dune exec
ordune build
. Also, running with the-h
flag gets you, assuming that command is correct:What options should we be passing?
Thank you.