summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2020-04-17 21:02:35 -0400
committerrsiddharth <s@ricketyspace.net>2020-04-17 21:02:35 -0400
commitb924fc2f66d46ee10aa3b800a6521d3940919f9f (patch)
tree130a19d8211874e3ba01203af0d2332506106be4 /README.md
parent1bab8e87d3875f672e7c36d10aea9e05f657c664 (diff)
nserver/ -> ./
Diffstat (limited to 'README.md')
-rw-r--r--README.md71
1 files changed, 71 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..3c1309e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,71 @@
+# nserver
+
+A nihilistic stats server written is part of reading Learn C the
+Harday.
+
+
+## compiling
+
+You'll need a C compiler (clang or gcc), the [gdbm][1] library and
+[GNU make][2].
+
+[1]: https://www.gnu.org.ua/software/gdbm
+[2]: https://www.gnu.org/software/make
+
+To compile the server, do:
+
+```
+make
+```
+
+To compile a debuggable version of the server, do:
+
+```
+make dev
+```
+
+The usual:
+
+```
+make clean
+```
+
+clean up things.
+
+
+## statserve
+
+To start this server, do:
+
+```
+./bin/statserve
+```
+
+It'll be listening on port 7899.
+
+You can connect as a client to the server via `nc`:
+
+```
+nc 127.0.0.1 7899
+```
+
+
+### client commands
+
+Recognized commands:
+
+
+```
+/create NAME
+/sample NAME
+/mean NAME
+/dump NAME
+/list
+/store NAME
+/load NAME ANOTHER_NAME
+```
+
+The `/store` command stores `NAME` in a persistent database on the disk.
+
+The `/load` command loads the `NAME` from the persistent database into
+memory at ANOTHER_NAME.