ibis/scripts/watch.sh

14 lines
375 B
Bash
Raw Normal View History

2024-01-30 10:09:18 +00:00
#!/bin/sh
set -e
2024-02-08 16:04:56 +00:00
IBIS__BIND="${IBIS_BIND:-"127.0.0.1:8081"}"
2024-01-30 11:32:02 +00:00
2024-01-30 10:09:18 +00:00
# run processes in parallel
# https://stackoverflow.com/a/52033580
2024-02-27 18:00:42 +00:00
(trap 'kill 0' INT;
2024-01-30 10:09:18 +00:00
# start frontend
2024-02-08 16:04:56 +00:00
CARGO_TARGET_DIR=target/frontend trunk serve -w src/frontend/ --proxy-backend http://$IBIS__BIND &
# start backend, with separate target folder to avoid rebuilds from arch change
2024-02-01 15:51:38 +00:00
cargo watch -x run
2024-01-30 10:09:18 +00:00
)