Created
October 14, 2016 00:17
-
-
Save emilong/0d96b0cb8089dbecf526c94fadcc2c60 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Waiting for servers to start..." | |
while true; do | |
curl -f http://localhost:8000/health > /dev/null 2> /dev/null | |
if [ $? = 0 ]; then | |
echo "Frontend started" | |
curl -f http://localhost:3000/health > /dev/null 2> /dev/null | |
if [ $? = 0 ]; then | |
echo "Backend started" | |
break | |
fi | |
fi | |
sleep 10 | |
echo -n . | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What should be echo'd / returned if a service has failed. E.G. it's has started, but doesn't function correctly (based on 'bad' response, like a
null
when some endpoint should return data)?