summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/run15
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/run b/tools/run
index 452355e..562a94d 100755
--- a/tools/run
+++ b/tools/run
@@ -1,8 +1,15 @@
#!/bin/bash -e
## tools/run [ARGS...]
-##
-## Run the server in development mode. Shorthand for `cargo run`.
-tools/build-ui
-cargo run -- "$@"
+if [ -z ${HI_DEV+x} ]; then
+ tools/build-ui
+ cargo run -- "$@"
+else
+ npm run dev & PIDS[0]=$!
+ cargo run -- "$@" & PIDS[1]=$!
+
+ trap "kill ${PIDS[*]}" SIGINT
+
+ wait
+fi