Update app.sh
This commit is contained in:
parent
f3acfb9da4
commit
f5ecab9c99
19
app.sh
19
app.sh
|
@ -23,14 +23,6 @@ case "${STORAGE_TYPE}" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# If TEST_MODE is true, install Mocha and run tests
|
|
||||||
if [ "$TEST_MODE" = "true" ]; then
|
|
||||||
echo "Installing Mocha for testing..."
|
|
||||||
npm install mocha
|
|
||||||
echo "Running tests..."
|
|
||||||
npm test
|
|
||||||
else
|
|
||||||
# Normal startup
|
|
||||||
# Generate config.js from environment variables
|
# Generate config.js from environment variables
|
||||||
cat > config.js <<EOF
|
cat > config.js <<EOF
|
||||||
{
|
{
|
||||||
|
@ -65,6 +57,13 @@ else
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Start the server
|
# If TEST_MODE is true, install Mocha and run tests
|
||||||
|
if [ "$TEST_MODE" = "true" ]; then
|
||||||
|
echo "Installing Mocha for testing..."
|
||||||
|
npm install mocha
|
||||||
|
echo "Running tests..."
|
||||||
|
npm test
|
||||||
|
else
|
||||||
|
# Start the server for normal run
|
||||||
exec node server.js
|
exec node server.js
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue