aboutsummaryrefslogtreecommitdiff
path: root/examples/working-loaded/httpServer.test
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2013-09-04 01:55:51 +0200
committerDrahflow <drahflow@gmx.de>2013-09-04 01:55:51 +0200
commit3fb7dd375ada97b9413abfecccd8a889c53dc93a (patch)
tree583915d9624b8892519334023282ab99b2ead632 /examples/working-loaded/httpServer.test
parent20efe1efeb3c62b884ccc16fd77e3b4c430c3ed9 (diff)
Minimal HTTP server
Diffstat (limited to 'examples/working-loaded/httpServer.test')
-rw-r--r--examples/working-loaded/httpServer.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/working-loaded/httpServer.test b/examples/working-loaded/httpServer.test
new file mode 100644
index 0000000..fdfce61
--- /dev/null
+++ b/examples/working-loaded/httpServer.test
@@ -0,0 +1,15 @@
+net .alg .httpServer "+" via
+ { 2002 } +port
+ { ":" via
+ :url dump
+ [
+ { :url "/" streq } {
+ "<html><body>Hallo Welt!<a href=\"/test\">Test</a></body></html>"
+ "text/html" :ok
+ } { :url "/test" streq } {
+ "<html><body>Test!</body></html>"
+ "text/html" :ok
+ }
+ ] conds
+ } +request
+ +run