Skip to content

Instantly share code, notes, and snippets.

@lojic
Created June 29, 2018 20:45
Show Gist options
  • Save lojic/b0e4a8f22d33ac70b0525824ca7a4ad4 to your computer and use it in GitHub Desktop.
Save lojic/b0e4a8f22d33ac70b0525824ca7a4ad4 to your computer and use it in GitHub Desktop.
(define (application-controller connection request)
(output-response/method
connection
(response
200
#"OK"
(current-seconds)
TEXT/HTML-MIME-TYPE
empty
(λ (op) (write-bytes #"<html><body>Hello, World!</body></html>" op)))
(request-method request)))
(serve
#:dispatch application-controller
#:port 8080)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment