ibis/scripts/watch.sh

14 lines
399 B
Bash
Raw Normal View History

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