From 7b128c660a798759c6f9e1d6751b811ce1d2874f Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Sat, 17 Jul 2021 14:49:03 +0200 Subject: made server host on root --- org-roam-ui.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'org-roam-ui.el') diff --git a/org-roam-ui.el b/org-roam-ui.el index 1301627..b11e504 100644 --- a/org-roam-ui.el +++ b/org-roam-ui.el @@ -1,8 +1,15 @@ (require 'json) (require 'simple-httpd) +(defvar org-roam-ui-root + (concat (file-name-directory + (f-full (or + load-file-name + buffer-file-name))) + ".")) + (setq org-roam-ui/root-dir (file-name-directory load-file-name)) -(setq org-roam-ui/app-build-dir (expand-file-name "./" org-roam-ui/root-dir)) +(setq org-roam-ui/app-build-dir (expand-file-name "./web-build/" org-roam-ui-root)) (define-minor-mode org-roam-ui-mode @@ -14,6 +21,7 @@ (cond (org-roam-ui-mode (setq-local httpd-port 35901) + (setq httpd-root org-roam-ui/app-build-dir) (httpd-start)) (t (httpd-stop)))) -- cgit v1.2.3