[racket] Setting web server root
Suppose I just create a simple web server:
(define (kickoff req)
(kickoff
(send/suspend
(lambda (k-url)
(response/xexpr
`(html (body (a ([href ,k-url]) "Hello world!"))))))))
;;; Start the server
(define (go)
(define log-to (build-path (find-system-path 'home-dir)
"racket-server-access.txt"))
(serve/servlet kickoff #:port 8080 #:servlet-path "/oner.rkt"
#:listen-ip #f #:log-file log-to))
(go)
How do I get kickoff to be the home page? I have tried setting #:servlet-path
to "/", but I just get back:
Welcome to the Racket Web Server
Find out more about writing servlets by reading the Continue tutorial in the
Help Desk.Welcome to the Racket Web Server ...
I'm sure it's something simple, but I can't find out what.