5 (require (prefix-in env: web-server/servlet-env)
6 (prefix-in log: web-server/dispatchers/dispatch-log)
7 (prefix-in res: web-server/configuration/responders)
8 (prefix-in xpr: web-server/http/xexpr))
13 (let* ([program (path->string (find-system-path 'run-file))]
14 [log-file (current-error-port)]
15 [listen-addr "0.0.0.0"]
26 ip-addr "Listen address."
27 (set! listen-addr ip-addr)]
29 port-number "Listen port."
30 (set! listen-port (string->number port-number))]
32 file "Log file [default: stderr]."
35 (set! paths-to-serve (cons path paths)))
36 (define (custom-dispatcher _)
40 (body "if you're reading this - server configuration is wrong."))))
43 #:listen-ip listen-addr
45 #:launch-browser? browser?
46 #:extra-files-paths paths-to-serve
48 #:log-format log:paren-format
50 ;#:servlet-regexp #rx"" ; <-- causes / to be routed to custom-dispatcher.