mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
21 lines
376 B
Bash
Executable File
21 lines
376 B
Bash
Executable File
set -x
|
|
|
|
LOG_FILE=$(mktemp)
|
|
npm start > $LOG_FILE 2>&1 &
|
|
SERVER_PID=$!
|
|
while ! grep -q "Express running" "$LOG_FILE"; do
|
|
if ! kill -0 $SERVER_PID; then
|
|
echo "Server exited unexpectedly."
|
|
cat $LOG_FILE
|
|
return 1
|
|
fi
|
|
sleep 1
|
|
done
|
|
curl http://127.0.0.1:3000 | grep -q 'Welcome to LiquidJS'
|
|
RESULT=$?
|
|
killall node
|
|
rm $LOG_FILE
|
|
if [ $RESULT != 0 ]; then
|
|
exit 1
|
|
fi
|