31 lines
334 B
Bash
31 lines
334 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
echo "Starting the python server..."
|
||
|
|
||
|
pushd backend
|
||
|
source venv/bin/activate
|
||
|
|
||
|
FRONTEND_PATH=$(realpath ../frontend) python main.py &
|
||
|
pid_backend=$!
|
||
|
|
||
|
trap_ctrlc() {
|
||
|
kill $pid_backend
|
||
|
}
|
||
|
|
||
|
trap trap_ctrlc INT
|
||
|
|
||
|
popd
|
||
|
|
||
|
sleep 3
|
||
|
|
||
|
echo "Building frontend..."
|
||
|
|
||
|
pushd frontend
|
||
|
npm run build
|
||
|
popd
|
||
|
|
||
|
echo "Done!"
|
||
|
|
||
|
wait
|