1
0
Fork 0
mirror of https://github.com/Nutomic/ibis.git synced 2024-11-24 21:21:09 +00:00
ibis/scripts/watch.sh

16 lines
438 B
Bash
Raw Permalink 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
killall trunk || true
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
CARGO_TARGET_DIR=target/frontend trunk serve -w src/frontend/ -w assets/ --proxy-backend http://$IBIS__BIND &
2024-02-08 16:04:56 +00:00
# start backend, with separate target folder to avoid rebuilds from arch change
cargo watch --ignore assets/ibis.css --exec run
2024-01-30 10:09:18 +00:00
)