Listen and SSL setup.

This commit is contained in:
Dominik Pantůček 2025-03-31 21:12:04 +02:00
parent be9a620fd2
commit 6748d4327c

View file

@ -2,6 +2,10 @@
command-line command-line
texts) texts)
(define -port- (make-parameter #f))
(define -certificate- (make-parameter #f))
(define -key- (make-parameter #f))
(command-line (command-line
print-help print-help
(-h () "This help" (-h () "This help"
@ -18,7 +22,20 @@
(exit 0)) (exit 0))
"" ""
"Configuration options:" "Configuration options:"
(-p (port) "Listen port"
(-port- (string->number port)))
(-c (cert) "Certificate"
(-certificate- cert))
(-k (key) "Private key"
(-key- key))
) )
(display "brminv") (define ssl? (and (-certificate-) (-key-) #t))
(newline) (define port (or (-port-) (if ssl? 443 80)))
(print banner-line)
(print "Port: " port)
(print "SSL: " ssl?)
(when ssl?
(print " Certificate:" (-certificate-))
(print " Key:" (-key-)))