File size: 363 Bytes
8830fa5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #!/usr/bin/env bash
DIR="$(cd "$(dirname "$0")" && pwd)"
PIDS=()
cleanup() {
for pid in "${PIDS[@]}"; do
kill "$pid" 2>/dev/null
done
}
trap cleanup EXIT
# Start backend
(
source "$DIR/.venv/bin/activate"
cd "$DIR/backend"
python run.py
) &
PIDS+=($!)
# Start frontend
(
cd "$DIR/frontend"
npm run dev
) &
PIDS+=($!)
wait
|