builder in clogframe

This commit is contained in:
David Botton 2022-09-02 17:53:38 -04:00
parent 909e444b5f
commit fd0ddc55fa
9 changed files with 29 additions and 10 deletions

View file

@ -106,7 +106,7 @@ set (logging to browser console), "
(clog-gui:clog-gui-initialize body))
(setf clog-user::*body* body))
:path "/repl")
(open-browser :url "http://127.0.0.1:8080/repl")
(open-browser :url (format nil "http://127.0.0.1:~A/repl" *clog-port*))
(format t "Use clog-user:*body* to access the clog-repl window."))
;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -28,6 +28,9 @@ the same as the clog directy this overides the relative paths used in them.")
(defvar *extended-routing* nil
"If true extended routing is done.")
(defparameter *clog-port* 8080
"Port this instance of clog was started on")
;;;;;;;;;;;;;;;;
;; initialize ;;
;;;;;;;;;;;;;;;;
@ -111,6 +114,7 @@ example."
(set-on-new-window on-new-window-handler :path "/" :boot-file boot-file))
(unless *clog-running*
(setf *clog-running* t)
(setf *clog-port* port)
(setf *static-root* (truename (or *overide-static-root*
static-root)))
(apply #'clog-connection:initialize
@ -163,7 +167,7 @@ BOOT-FILE will be used. If BOOT-FILE is nil path is removed."
;; open-browser ;;
;;;;;;;;;;;;;;;;;;
(defun open-browser (&key (url "http://127.0.0.1:8080"))
(defun open-browser (&key (url (format nil "http://127.0.0.1:~A" *clog-port*)))
"Launch on os a web browser on local machine to URL. See OPEN-WINDOW
for openning windows on remote machines."
(handler-case

View file

@ -65,6 +65,7 @@ embedded in a native template application.)"
"CLOG Startup and Shutdown"
(initialize function)
(*static-root* variable)
(*clog-port* variable)
(set-on-new-window function)
(is-running-p function)
(shutdown function)