From 747649b1ceb43283fcf98967bb1e56e8af1d7625 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Wed, 19 Apr 2023 14:01:35 -0400 Subject: [PATCH] Fix port number type and log to stderr by default --- home/bin/websrv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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))) -- 2.20.1