doc: Debugging bash example

This commit is contained in:
Roberto Abdelkader Martínez Pérez
2020-04-22 10:26:29 +02:00
parent f78f99511e
commit a178d19360
@@ -108,3 +108,17 @@ In order to be able to debug user request executions, the server subcommand has
a ``--debug`` option flag that redirects the script standard output and standard error
to Kapow! standard output, so you can use ``set -x`` at the beginning of the script
the same way as in pow files.
.. code-block:: console
$ cat withdebug.pow
#!/usr/bin/env bash
kapow route add / - <<-'EOF'
set -x
echo "This will be seen in the log"
echo "Hi HTTP" | kapow set /response/body
EOF
$ kapow server --debug withdebug.pow