From 42329a6f564d68110588113161d4959c4275eee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Gallego=20Rodr=C3=ADguez?= Date: Mon, 24 Feb 2020 14:56:21 +0100 Subject: [PATCH] kapow! tidy server example --- .../examples/working_with_pow_files.rst | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/source/examples/working_with_pow_files.rst b/docs/source/examples/working_with_pow_files.rst index 610cdd2..257625e 100644 --- a/docs/source/examples/working_with_pow_files.rst +++ b/docs/source/examples/working_with_pow_files.rst @@ -71,3 +71,28 @@ If you need to write more complex actions, you can leverage multiline commands: `_ +Keep things tidy +---------------- + +Sometimes things grow, and keep things tidy it's the only way to mantain the +hole thing. + +You can distribute your endpoints among several pow files. And you can keep the +hole thing documented in one html server with kapow. + +.. code-block:: console + :linenos: + + $ cat index.pow + #!/bin/bash + + kapow route add / - <<-'EOF' + cat howto.html | kapow set /response/body + EOF + + source ./info_stuff.pow + source ./other_endpoints.pow + +As you can see the pow files can be imported into another pow files using +source. In fat a pow file it's a regular shell file. +