diff --git a/syndicate-examples/http-server.rkt b/syndicate-examples/http-server.rkt index 69299c2..c44a0ea 100644 --- a/syndicate-examples/http-server.rkt +++ b/syndicate-examples/http-server.rkt @@ -52,4 +52,15 @@ `(h1 "Second page") `(a ((href "/")) "Go back"))))) + (spawn #:name 'server2 + (at ds + (assert (HttpBinding #f 8080 'get (list (PathPatternElement-label "page3")) + (object + [(HttpContext req res) + (at res + (log-info "+page3") + (on-stop (log-info "-page3")) + (send! (HttpResponse-header 'content-type "text/plain")) + (send! (HttpResponse-done "this is page3\n")))]))))) + )))