Skip to content
Snippets Groups Projects
Commit f9ea2766 authored by Frankly George's avatar Frankly George
Browse files

serve.sh

parent 1de40284
No related branches found
No related tags found
1 merge request!12145serve.sh
serve.sh 0 → 100755
#!/bin/bash
# run a Node based web server
# run dependencyCheck.sh
./devTools/scripts/dependencyCheck.sh
exitCode=$?
# exit code is now stored in $exitCode
# if exit code is 69, then we don't have all the dependencies we need
if [[ $exitCode -eq 69 ]]; then
echo "Dependencies not met."
echo ""
exit 0
# if exit code is not 0, print error message
elif [[ $exitCode -ne 0 ]]; then
echo "dependencyCheck.sh exited with code: $exitCode"
echo "Dependency check failed unexpectedly."
echo ""
exit 0
# if exit code is 0, run web server
else
npx http-server --port 6969 -c-1
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment