Embed webapp into the binary with fs-embed, drop --static-dir
ottyl was requiring webapp/dist to be shipped alongside the binary and served via ServeDir/ServeFile pointed at a --static-dir CLI arg. Embed the built webapp at compile time instead, so ottyl is a single self-contained executable with no runtime static directory dependency. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XFUNZwCvz3kcod3352ZR2o
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
1d1b0eee01
commit
7694dcf120
@@ -11,6 +11,17 @@ cli_command --verbose | ottyl
|
||||
|
||||
```
|
||||
|
||||
# Building
|
||||
|
||||
The webapp is embedded into the `ottyl` binary at compile time, so `webapp/dist` must exist *before* running `cargo build`:
|
||||
|
||||
```bash
|
||||
cd webapp && npm install && npm run build && cd ..
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
The resulting binary is self-contained — no `webapp/dist` directory or `--static-dir` flag is needed at runtime.
|
||||
|
||||
# Architecture
|
||||
|
||||
ottyl reads the logs via stdin and indexes it in-memory in a BTreeMap for property search.
|
||||
|
||||
Reference in New Issue
Block a user