Skip to content

Commit 934daca

Browse files
docs: add --webpath instructions for aw-server-rust (#764)
On some platforms (e.g. Windows), aw-server-rust bundles static assets into the executable, so copying files to the static/ directory has no effect. The --webpath flag provides a cleaner alternative. Closes #608
1 parent 919e9f3 commit 934daca

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ npm run build
5050

5151
### By copying the web-assets to your main install
5252

53-
You can run a development version of aw-webui with your main version of ActivityWatch by building it (or fetching the latest build from CI) and replacing placing the contents of the `static` directory of your aw-server (or aw-server-rust) installation. For simplicity, back up the original directory for easier switching back.
53+
You can run a development version of aw-webui with your main version of ActivityWatch by building it (or fetching the latest build from CI) and replacing the contents of the `static` directory of your aw-server (or aw-server-rust) installation. For simplicity, back up the original directory for easier switching back.
5454

5555
The assets are stored in the following directories (relative to your installation directory), depending on if you use aw-server-python (default) or aw-server-rust:
5656

@@ -61,6 +61,17 @@ You can copy the assets manually from your `make build` or `npm run build` outpu
6161

6262
Once you've put the files in the directories, you may have to do a hard refresh in your browser to invalidate any stale caches.
6363

64+
### Using `--webpath` with aw-server-rust
65+
66+
Instead of copying files, `aw-server-rust` supports loading the web UI from a custom path via the `--webpath` flag. This is especially useful on platforms where the server bundles static assets into the executable (e.g. Windows):
67+
68+
```bash
69+
# Point aw-server-rust to your local build output
70+
aw-server-rust --webpath /path/to/aw-webui/dist
71+
```
72+
73+
This avoids having to copy files and makes it easy to switch between development and production builds.
74+
6475
### Using your main install's data
6576

6677
If you want to actively iterate on `aw-webui` with your local production data (with your production server running), you'll want to use a development build, automatically update it, and connect to your production data. To do this, in `aw-webui` source directory, in one terminal window run:

0 commit comments

Comments
 (0)