Adding SSL keys for the clack:clackup call

This commit is contained in:
Christopher Mark Gore 2024-01-11 13:22:55 -06:00
parent 5f697aa78e
commit c083f905b2
2 changed files with 18 additions and 4 deletions

View file

@ -395,7 +395,10 @@ the default answer. (Private)"
(boot-function nil) (boot-function nil)
(static-boot-html nil) (static-boot-html nil)
(static-boot-js nil) (static-boot-js nil)
(static-root #P"./static-files/")) (static-root #P"./static-files/")
(ssl nil)
(ssl-key-file nil)
(ssl-cert-file nil))
"Initialize CLOG on a socket using HOST and PORT to serve BOOT-FILE as the "Initialize CLOG on a socket using HOST and PORT to serve BOOT-FILE as the
default route for '/' to establish web-socket connections and static files default route for '/' to establish web-socket connections and static files
located at STATIC-ROOT. The webserver used with CLACK can be chosen with located at STATIC-ROOT. The webserver used with CLACK can be chosen with
@ -548,9 +551,14 @@ the contents sent to the brower."
lack-middleware-list lack-middleware-list
:initial-value *app* :initial-value *app*
:from-end t)) :from-end t))
(setf *client-handler* (clack:clackup *app* :server server :address host :port port)) (setf *client-handler* (clack:clackup *app* :server server :address host :port port :ssl ssl :ssl-key-file ssl-key-file :ssl-cert-file ssl-cert-file))
(format t "HTTP listening on : ~A:~A~%" host port) (format t "HTTP listening on : ~A:~A~%" host port)
(format t "HTML root : ~A~%" static-root) (format t "HTML root : ~A~%" static-root)
(format t "SSL : ~A~%" (if ssl
"yes"
"no"))
(format t "SSL Key File : ~A~%" ssl-key-file)
(format t "SSL Cert File : ~A~%" ssl-cert-file)
(format t "Long poll first : ~A~%" (if long-poll-first (format t "Long poll first : ~A~%" (if long-poll-first
"yes" "yes"
"no")) "no"))

View file

@ -76,7 +76,10 @@ the same as the clog directy this overides the relative paths used in them.")
(static-boot-html nil) (static-boot-html nil)
(static-boot-js nil) (static-boot-js nil)
(static-root (merge-pathnames "./static-files/" (static-root (merge-pathnames "./static-files/"
(asdf:system-source-directory :clog)))) (asdf:system-source-directory :clog)))
(ssl nil)
(ssl-key-file nil)
(ssl-cert-file nil))
"Inititalize CLOG on a socket using HOST and PORT to serve BOOT-FILE as the "Inititalize CLOG on a socket using HOST and PORT to serve BOOT-FILE as the
default route to establish web-socket connections and static files located at default route to establish web-socket connections and static files located at
STATIC-ROOT. The webserver used with CLACK can be chosen with :SERVER and STATIC-ROOT. The webserver used with CLACK can be chosen with :SERVER and
@ -110,7 +113,10 @@ see tutorial 12 for an example."
boot-function boot-function
static-boot-html static-boot-html
static-boot-js static-boot-js
static-root)) static-root
ssl
ssl-cert-file
ssl-key-file))
(setf *extended-routing* extended-routing) (setf *extended-routing* extended-routing)
(when on-new-window-handler (when on-new-window-handler
(set-on-new-window on-new-window-handler :path "/" :boot-file boot-file)) (set-on-new-window on-new-window-handler :path "/" :boot-file boot-file))