diff options
author | Colin Okay <colin@cicadas.surf> | 2022-08-04 07:53:52 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-08-04 07:53:52 -0500 |
commit | 0fbe8babab5fb52a7604a797195bce230519b1c4 (patch) | |
tree | 339b723a3a322e0ffbbaa7c3a88d295b4ccc15cf /src/main.lisp | |
parent | 0752c7554a791ffb0e28b27300161a9552b57a21 (diff) |
[add] swank support
Diffstat (limited to 'src/main.lisp')
-rw-r--r-- | src/main.lisp | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/src/main.lisp b/src/main.lisp index f0c2ea5..4a94fa9 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -302,6 +302,9 @@ contributors will be made. You should destroy this file after the initial boot up, subsequent boots will not need it, even if it remains mentioned in th config file. +:SWANK-PORT should be a port number (or absent). When present the +startup process attempts to start as swank server on the provided port. + " (handler-case (progn @@ -310,17 +313,24 @@ mentioned in th config file. (with-open-file (input config-file) (read input)))) (with-plist - (port address salt-file domain store-dir init-admins-file) config - ;; start the server with options in the config. - - (apply 'start - (nconc - (when port (list :port port)) - (when salt-file - (list :salt (salt-from-file salt-file))) - (when address (list :address address)) - (when domain (list :domain domain)) - (when store-dir (list :store-dir store-dir)))) + (port address salt-file domain store-dir init-admins-file swank-port) config + ;; when swhank port, start swank + (when swank-port + (bt:make-thread + (lambda () + (swank:create-server + :port swank-port + :dont-close t)))) + + ;; start the server with options in the config. + (apply 'start + (nconc + (when port (list :port port)) + (when salt-file + (list :salt (salt-from-file salt-file))) + (when address (list :address address)) + (when domain (list :domain domain)) + (when store-dir (list :store-dir store-dir)))) ;; make any admins listed. (when init-admins-file (make-admins-from-file init-admins-file))))) |