From: Siraaj Khandkar Date: Wed, 19 Apr 2023 18:01:35 +0000 (-0400) Subject: Fix port number type and log to stderr by default X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=747649b1ceb43283fcf98967bb1e56e8af1d7625;p=khome.git Fix port number type and log to stderr by default --- diff --git a/home/bin/websrv b/home/bin/websrv index 6076e4f..d4288df 100755 --- a/home/bin/websrv +++ b/home/bin/websrv @@ -11,7 +11,7 @@ (module+ main (let* ([program (path->string (find-system-path 'run-file))] - [log-file (string-append program ".log")] + [log-file (current-error-port)] [listen-addr "0.0.0.0"] [listen-port 8000] [paths-to-serve '()] @@ -27,9 +27,9 @@ (set! listen-addr ip-addr)] [("-p" "--port") port-number "Listen port." - (set! listen-port port-number)] + (set! listen-port (string->number port-number))] [("-l" "--log") - file "Log file." + file "Log file [default: stderr]." (set! log-file file)] #:args (path . paths) (set! paths-to-serve (cons path paths)))