blob: 7ffb7e72b1093925fb0cb8f1e72c82dbf6911b05 (
plain) (
tree)
|
|
#! /usr/bin/env chibi-scheme
; Simple HTTP server
(import
(chibi)
(chibi net http-server)
(chibi net servlet)
(chibi sxml))
(define config-port 8000)
(let ((count 0))
(run-http-server
config-port
(lambda (cfg request next restart)
(set! count (+ 1 count))
(servlet-write request
(sxml->xml
`(html
(head
(title "counter"))
(body
(h1 "Count: ")
(p ,count))))))))
|