feat: daemon mode with named socket, scripts/run for IP:PORT
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user