Skip to content

Commit

Permalink
Merge branch 'turtle-bazon-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
fukamachi committed Jun 20, 2019
2 parents 2fa9839 + 383dae6 commit 0c49a8e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/clack.lisp
Expand Up @@ -70,6 +70,7 @@

(defun clackup (app &rest args
&key (server :hunchentoot)
(address "127.0.0.1")
(port 5000)
(debug t)
silent
Expand All @@ -94,7 +95,7 @@
(find-handler server)
(when (and (not use-thread)
(not silent))
(format t "~&~:(~A~) server is going to start.~%Listening on localhost:~A.~%" server port))
(format t "~&~:(~A~) server is going to start.~%Listening on ~A:~A.~%" server address port))
(with-handle-interrupt (lambda ()
(format *error-output* "Interrupted"))
(prog1
Expand All @@ -105,4 +106,4 @@
(delete-from-plist args :server :port :debug :silent :use-thread))
(when (and use-thread
(not silent))
(format t "~&~:(~A~) server is started.~%Listening on localhost:~A.~%" server port)))))))
(format t "~&~:(~A~) server is started.~%Listening on ~A:~A.~%" server address port)))))))
4 changes: 3 additions & 1 deletion src/handler/hunchentoot.lisp
Expand Up @@ -78,7 +78,7 @@
(call-next-method)))

(defun run (app &rest args
&key debug (port 5000) (address "0.0.0.0")
&key debug (address "127.0.0.1") (port 5000)
ssl ssl-key-file ssl-cert-file ssl-key-password
max-thread-count max-accept-count (persistent-connections-p t))
"Start Hunchentoot server."
Expand All @@ -98,6 +98,7 @@
(apply #'make-instance 'clack-ssl-acceptor
:app app
:debug debug
:address address
:port port
:address address
:ssl-certificate-file ssl-cert-file
Expand All @@ -110,6 +111,7 @@
(apply #'make-instance 'clack-acceptor
:app app
:debug debug
:address address
:port port
:address address
:access-log-destination nil
Expand Down
3 changes: 2 additions & 1 deletion src/handler/toot.lisp
Expand Up @@ -20,7 +20,7 @@
(in-package :clack.handler.toot)

(defun run (app &rest args
&key debug (port 5000)
&key debug (address "127.0.0.1") (port 5000)
ssl ssl-key-file ssl-cert-file ssl-key-password)
"Start Toot server."
(cond
Expand All @@ -44,6 +44,7 @@
(error (error)
(princ error *error-output*)
'(500 () ("Internal Server Error"))))))))
:address address
:port port
:access-logger nil
(if ssl
Expand Down
4 changes: 3 additions & 1 deletion src/handler/wookie.lisp
Expand Up @@ -53,7 +53,7 @@
(setf (wookie:request-store-body request) t))

(defun run (app &rest args
&key (debug t) (port 5000)
&key (debug t) (address "127.0.0.1") (port 5000)
ssl ssl-key-file ssl-cert-file ssl-key-password)
(cond
((asdf::getenv "SERVER_STARTER_PORT")
Expand All @@ -78,11 +78,13 @@
(let ((listener
(if ssl
(make-instance 'wookie:ssl-listener
:bind address
:port port
:key ssl-key-file
:certificate ssl-cert-file
:password ssl-key-password)
(make-instance 'wookie:listener
:bind address
:port port))))
(start-server listener)))
(as:socket-closed () nil))))
Expand Down

0 comments on commit 0c49a8e

Please sign in to comment.