summaryrefslogtreecommitdiff
path: root/cattrap/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'cattrap/README.md')
-rw-r--r--cattrap/README.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/cattrap/README.md b/cattrap/README.md
new file mode 100644
index 0000000..4a2cb41
--- /dev/null
+++ b/cattrap/README.md
@@ -0,0 +1,17 @@
+# cattrap
+
+A wrapper for a simple HTTP server. Will serve the current working directory via HTTP, unless the browser's user agent matches the user-supplied regex: in which case it will serve ascii art of a still frame + lyrics from Rick Astley's hit single, "Never Gonna Give You Up".
+
+## Usage
+
+```bash
+[apropos@arch cattrap]$ nimble build --d:release --warnings:off
+...
+[apropos@arch cattrap]$ ./cattrap
+usage: cattrap <port> <regex>
+[apropos@arch cattrap]$ ./cattrap 8082 curl
+DEBUG Prologue is serving at http://0.0.0.0:8082
+DEBUG Starting 1 threads
+```
+
+Nim + Nimble are best installed via [choosenim](https://github.com/dom96/choosenim). A Linux x86_64 binary is supplied, however.