wisp
 
(Arne Babenhauserheide)
2013-04-17: let the webserver test for the username. Can’t find it.

let the webserver test for the username. Can’t find it.

diff --git a/hello-world-server.w b/hello-world-server.w
--- a/hello-world-server.w
+++ b/hello-world-server.w
@@ -2,10 +2,17 @@
 
 define : hello-world-handler request request-body
   values 
-    ' :                            
-        content-type . : text/plain
-    . "Hello World!"
+    ' : content-type . : text/plain
+    let : : text "Hello World!"
+      display : getlogin
+      if : string? : getlogin
+         set! text : string-append text : getlogin
+         set! text : string-append text " Sucker!"
+      . text
 
 use-modules : web server
 
+display : string-append "Server starting. Test it at http://127.0.0.1:8081"
+newline
+
 run-server hello-world-handler 'http ' : #:port 8081