Skip to content

Commit

Permalink
startbe shell script returns
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexRoehm committed Mar 30, 2024
1 parent 4927e62 commit f7078fb
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions startbe.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/bash
function clean_up()
{
echo "Exiting..."
kill $bePID
exit
}
# Trigger cleanup on CTRL + C
trap clean_up SIGINT EXIT

cd backend
yarn
node ./node_modules/.bin/ts-node src/index.ts > ../cypress/logs/back-end.log &
bePID=$!
CHECKBE=""
i=0
while [ -z "${CHECKBE}" -a $i -lt 20 ];
do
CHECKBE=`curl -s http://localhost:3003/api/podcasts -I | grep 200`
sleep 2s
let "(i++)"
done

trap clean_up ERR

0 comments on commit f7078fb

Please sign in to comment.