From 33398b0b6b36c6f838ac8523f6ad8fee16fa965c Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Tue, 31 Mar 2020 16:14:09 +0200 Subject: [PATCH] Also mention STGUIASSETS --- README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 714709ffb..e032af24b 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,27 @@ In production we serve the UI through Syncthing itself. The easiest way to do that is to simply put the built assets in the `gui` subdirectory of Syncthing's config directory. -- `npm run build -- --prod` -- `rsync -va --delete dist/tech-ui/ ~/.config/syncthing/gui/default/tech-ui/` +``` +$ npm run build -- --prod +$ rsync -va --delete dist/tech-ui/ ~/.config/syncthing/gui/default/tech-ui/ +``` Adjust for your actual Syncthing config dir if different. Navigate to `http://localhost:8384/tech-ui/`. +Another option is to start Syncthing with the STGUIASSETS environment +variable pointing to the distribution directory. + +``` +$ npm run build -- --prod +$ ln -sf . dist/default +$ export STGUIASSETS=$(pwd)/dist +$ syncthing +``` + +The magic is symlink is because Syncthing will look for the GUI in the +`default` subdirectory. Navigate to `http://localhost:8384/tech-ui/`. + ## Code scaffolding Run `ng generate component component-name` to generate a new component. You