[racket] Setting web server root

From: Mark Carter (mcturra2000 at yahoo.co.uk)
Date: Mon Mar 14 08:38:36 EDT 2011

Suppose I just create a simple web server:

(define (kickoff req)
    (lambda (k-url)
       `(html (body (a ([href ,k-url]) "Hello world!"))))))))

;;; Start the server
(define (go)
  (define log-to (build-path (find-system-path 'home-dir) 
  (serve/servlet kickoff #:port 8080  #:servlet-path "/oner.rkt" 
                 #:listen-ip #f #:log-file log-to))


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.


Posted on the users mailing list.