Merge branch 'master' into imagemagick-anrdoid

This commit is contained in:
Matthew Raymer
2025-08-14 05:57:46 +00:00
22 changed files with 342 additions and 154 deletions

View File

@@ -300,18 +300,20 @@ serve_build() {
exit 5
fi
# Use a simple HTTP server to serve the build
if command -v python3 &> /dev/null; then
# Use a server that supports SPA routing (serves index.html for all routes)
if command -v npx &> /dev/null; then
log_info "Starting npx serve with SPA support on port 8080..."
npx serve -s dist -l 8080
elif command -v python3 &> /dev/null; then
log_warn "Python HTTP server doesn't support SPA routing. Routes like /discover, /account will return 404."
log_info "Starting Python HTTP server on port 8080..."
cd dist && python3 -m http.server 8080
elif command -v python &> /dev/null; then
log_warn "Python HTTP server doesn't support SPA routing. Routes like /discover, /account will return 404."
log_info "Starting Python HTTP server on port 8080..."
cd dist && python -m SimpleHTTPServer 8080
elif command -v npx &> /dev/null; then
log_info "Starting npx serve on port 8080..."
npx serve -s dist -l 8080
else
log_error "No suitable HTTP server found. Install Python or npx serve."
log_error "No suitable HTTP server found. Install npx serve or Python."
exit 5
fi
}