feat: daemon mode with named socket, scripts/run for IP:PORT

This commit is contained in:
2026-06-20 15:28:53 -04:00
parent 8ee1c261e7
commit 5b46999b3c
3 changed files with 78 additions and 10 deletions
+7 -2
View File
@@ -21,6 +21,10 @@
(defvar spine-port 8080
"Port for the Spine HTTP server.")
(defvar spine-host nil
"Host for the Spine HTTP server.
nil means localhost only. Set to a string like \"0.0.0.0\" to listen on
all interfaces.")
(defvar spine-template-dir
(expand-file-name "templates/"
@@ -47,10 +51,11 @@ Returns the rendered string."
("message" "Hello from Emacs.")))))
;; --- start ------------------------------------------------------------
(setq httpd-host spine-host)
(setq httpd-port spine-port)
(httpd-start)
(message "Spine listening on http://localhost:%d" spine-port)
(message "Spine listening on http://%s:%d"
(or spine-host "localhost") spine-port)
(provide 'spine)
;;; spine.el ends here