summaryrefslogtreecommitdiff
path: root/org-roam-ui.el
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-07-17 14:49:03 +0200
committerThomas F. K. Jorna <[email protected]>2021-07-17 14:49:03 +0200
commit7b128c660a798759c6f9e1d6751b811ce1d2874f (patch)
tree6718d248ec180aea89bd8a3b01e5c9e18871dc4c /org-roam-ui.el
parent7ff1b161c31fdb3cf2012ff4d374b317e1a1f2e5 (diff)
made server host on root
Diffstat (limited to 'org-roam-ui.el')
-rw-r--r--org-roam-ui.el10
1 files changed, 9 insertions, 1 deletions
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))))