Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ npm run build

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

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.
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.

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:

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

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.

### Using `--webpath` with aw-server-rust

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):

```bash
# Point aw-server-rust to your local build output
aw-server-rust --webpath /path/to/aw-webui/dist
```

This avoids having to copy files and makes it easy to switch between development and production builds.

### Using your main install's data

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:
Expand Down
Loading