blob: 04ae2d8232947061a3bcefb9def0d4509d96c907 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/bash -e
## tools/run
##
## Runs the service, and runs a development version of the UI, with hot
## reloading and live code changes enabled.
# Stop `cargo run` and `npx vite dev` from racing with each other with
# respect to the build output by forcing a build _first_, while neither
# is running.
cargo build
PIDS=()
trap 'kill "${PIDS[@]}"' EXIT
cargo run &
PIDS+=($!)
npx vite dev --host &
PIDS+=($!)
wait "${PIDS[@]}"
|