Add messages around the SPA auto-detect.
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 44s
Webapp Test / Run webapp test suite (pull_request) Successful in 4m34s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m24s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 8m53s
Smoke Test / Run basic test suite (pull_request) Successful in 4m37s
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 44s
Webapp Test / Run webapp test suite (pull_request) Successful in 4m34s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m24s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 8m53s
Smoke Test / Run basic test suite (pull_request) Successful in 4m37s
This commit is contained in:
parent
8f2da38183
commit
cfd961ccb3
@ -9,10 +9,11 @@ CERC_ENABLE_CORS="${CERC_ENABLE_CORS:-false}"
|
|||||||
CERC_SINGLE_PAGE_APP="${CERC_SINGLE_PAGE_APP}"
|
CERC_SINGLE_PAGE_APP="${CERC_SINGLE_PAGE_APP}"
|
||||||
|
|
||||||
if [ -z "${CERC_SINGLE_PAGE_APP}" ]; then
|
if [ -z "${CERC_SINGLE_PAGE_APP}" ]; then
|
||||||
if [ 1 -eq $(find "${CERC_WEBAPP_FILES_DIR}" -name '*.html' | wc -l) ] && [ -d "${CERC_WEBAPP_FILES_DIR}/static" ]; then
|
CERC_SINGLE_PAGE_APP=false
|
||||||
CERC_SINGLE_PAGE_APP=true
|
if [ 1 -eq $(find "${CERC_WEBAPP_FILES_DIR}" -name '*.html' | wc -l) ]; then
|
||||||
else
|
if [ -d "${CERC_WEBAPP_FILES_DIR}/static" ] || [ -d "${CERC_WEBAPP_FILES_DIR}/assets" ]; then
|
||||||
CERC_SINGLE_PAGE_APP=false
|
CERC_SINGLE_PAGE_APP=true
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -21,8 +22,11 @@ if [ "true" == "$CERC_ENABLE_CORS" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "true" == "$CERC_SINGLE_PAGE_APP" ]; then
|
if [ "true" == "$CERC_SINGLE_PAGE_APP" ]; then
|
||||||
|
echo "Serving content as single-page app. If this is wrong, set 'CERC_SINGLE_PAGE_APP=false'"
|
||||||
# Create a catchall redirect back to /
|
# Create a catchall redirect back to /
|
||||||
CERC_HTTP_EXTRA_ARGS="$CERC_HTTP_EXTRA_ARGS --proxy http://localhost:${CERC_LISTEN_PORT}?"
|
CERC_HTTP_EXTRA_ARGS="$CERC_HTTP_EXTRA_ARGS --proxy http://localhost:${CERC_LISTEN_PORT}?"
|
||||||
|
else
|
||||||
|
echo "Serving content normally. If this is a single-page app, set 'CERC_SINGLE_PAGE_APP=true'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LACONIC_HOSTED_CONFIG_FILE=${LACONIC_HOSTED_CONFIG_FILE}
|
LACONIC_HOSTED_CONFIG_FILE=${LACONIC_HOSTED_CONFIG_FILE}
|
||||||
@ -39,4 +43,4 @@ if [ -f "${LACONIC_HOSTED_CONFIG_FILE}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
/scripts/apply-runtime-env.sh ${CERC_WEBAPP_FILES_DIR}
|
/scripts/apply-runtime-env.sh ${CERC_WEBAPP_FILES_DIR}
|
||||||
http-server $CERC_HTTP_EXTRA_ARGS -p ${CERC_LISTEN_PORT} "${CERC_WEBAPP_FILES_DIR}"
|
http-server $CERC_HTTP_EXTRA_ARGS -p ${CERC_LISTEN_PORT} "${CERC_WEBAPP_FILES_DIR}"
|
||||||
|
Loading…
Reference in New Issue
Block a user