diff options
Diffstat (limited to 'tools/run')
| -rwxr-xr-x | tools/run | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -1,14 +1,17 @@ #!/bin/bash -e -## tools/run [ARGS...] +## tools/run +## +## Runs the service, and runs a development version of the UI, with hot +## reloading and live code changes enabled. -if [ -z ${PILCROW_DEV+x} ]; then - cargo run -- "$@" -else - npm run dev -- & PIDS[0]=$! - cargo run -- "$@" & PIDS[1]=$! +PIDS=() - trap "kill ${PIDS[*]}" SIGINT +trap 'kill "${PIDS[@]}"' EXIT - wait -fi +cargo run & +PIDS+=($!) +npm run dev -- --host & +PIDS+=($!) + +wait "${PIDS[@]}" |
