doc: drop mentions to .pow files ($deity REST their soul)

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
This commit is contained in:
pancho horrillo
2020-12-24 13:30:23 +01:00
parent e72c65c859
commit 26fa12c871
31 changed files with 159 additions and 146 deletions
+8 -5
View File
@@ -21,19 +21,22 @@ us easily **turn that into an HTTP API**.
### Let's see this with an example
We want to expose **log entries** for files not found on our **Apache Web
Server**, as an HTTP API. With *Kapow!* we just need to write this file:
Server**, as an HTTP API. With *Kapow!* we just need to write this
*executable* script:
```bash
[apache-host]$ cat search-apache-errors.pow
``` console
[apache-host]$ cat search-apache-errors
#!/usr/bin/env sh
kapow route add /apache-errors - <<-'EOF'
cat /var/log/apache2/access.log | grep 'File does not exist' | kapow set /response/body
cat /var/log/apache2/access.log | grep 'File does not exist' | kapow set /response/body
EOF
[apache-host]$ chmod +x search-apache-errors
```
and then, run it using *Kapow!*
```bash
[apache-host]$ kapow server --bind 0.0.0.0:8080 search-apache-errors.pow
[apache-host]$ kapow server --bind 0.0.0.0:8080 search-apache-errors
```
finally, we can read from the just-defined endpoint: