Skip to content

Instantly share code, notes, and snippets.

@shirok
Created January 28, 2016 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shirok/02119436075b47c496c4 to your computer and use it in GitHub Desktop.
Save shirok/02119436075b47c496c4 to your computer and use it in GitHub Desktop.
(use makiki)
(use gauche.net)
(define (main args)
(start-http-server :port 0 :startup-callback echo-server-info))
(define (echo-server-info server-socks)
(print (any (^s (sockaddr-port (socket-address s))) server-socks))
(flush))
(define-http-handler "/" (^[req app] (respond/ok req "OK!")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment