17 lines
733 B
Scheme
17 lines
733 B
Scheme
(module test mzscheme
|
|
(require (lib "servlet.ss" "web-server"))
|
|
(provide (all-defined))
|
|
(define interface-version 'v1)
|
|
(define timeout +inf.0)
|
|
(define count 0)
|
|
|
|
(define (start initial-request)
|
|
(with-handlers ([void (lambda (exn) `(html (body (p ,(exn-message exn)))))])
|
|
(set! count (add1 count))
|
|
`(html (head (title "Testing 1...2...3"))
|
|
(body (p "This is a generated web page.")
|
|
(p ,(format "Here are the bindings:~n~s~n" (request-bindings initial-request))
|
|
(br)
|
|
"Count = " ,(number->string count)
|
|
(br)
|
|
,(format "Here are the headers:~n~s~n" (request-headers initial-request)))))))) |