about summary refs log tree commit diff stats
path: root/adapter/protocol/about.nim
diff options
context:
space:
mode:
Diffstat (limited to 'adapter/protocol/about.nim')
-rw-r--r--adapter/protocol/about.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/adapter/protocol/about.nim b/adapter/protocol/about.nim
new file mode 100644
index 00000000..860294f3
--- /dev/null
+++ b/adapter/protocol/about.nim
@@ -0,0 +1,14 @@
+import std/envvars
+
+const chawan = staticRead"res/chawan.html"
+const license = staticRead"res/license.html"
+
+proc main() =
+  stdout.write("Content-Type: text/html\n\n")
+  case getEnv("MAPPED_URI_PATH")
+  of "blank": stdout.write("")
+  of "chawan": stdout.write(chawan)
+  of "license": stdout.write(license)
+  else: stdout.write("Error: about page not found")
+
+main()